Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incus_connection: Allow non-root users to connect to an instance #9742

Closed

Conversation

yeetypete
Copy link
Contributor

SUMMARY

Currently the incus_connection only supports connecting to an instance as root. This PR extends the plugin to allow a non-root user, configurable via the ansible_user var to connect to the instance. The option incus_become_method controls the command used to switch users, (su by default but could also be sudo -u). The defaults ensure the old behavior so this should be a non-breaking change.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

incus_connection

ADDITIONAL INFORMATION

Copies functionality from #9659 to the incus connection.

yeetypete and others added 30 commits January 31, 2025 20:40
@yeetypete yeetypete closed this Feb 14, 2025
cavcrosby and others added 26 commits February 14, 2025 22:49
* Fix for failed test

TASK [keycloak_client : Assert changes not detected in last two tasks (desire when same, and check)] ***
task path: /root/ansible_collections/community/general/tests/output/.tmp/integration/keycloak_client-p3ttqf7d-ÅÑŚÌβŁÈ/tests/integration/targets/keycloak_client/tasks/main.yml:79
fatal: [testhost]: FAILED! => {
    "assertion": "check_client_when_present_and_same is not changed",
    "changed": false,
    "evaluated_to": false,
    "msg": "Assertion failed"
}

* Improved test data to test more scenarios, e.g documentation uses True in examples

* Normalize values in config

* add changelog

* Apply suggestions from code review

Co-authored-by: Alexei Znamensky <[email protected]>

* Update tests/integration/targets/keycloak_client/vars/main.yml

Co-authored-by: Alexei Znamensky <[email protected]>

* Update changelogs/fragments/9644-kc_client-test-improvement-and-fix.yaml

Co-authored-by: Alexei Znamensky <[email protected]>

---------

Co-authored-by: Alexei Znamensky <[email protected]>
…ansible-collections#9691)

* fix: replace missing return (ansible-collections#9678)

* chore: add changelog fragment (ansible-collections#9678)

* chore: update changelog fragment (ansible-collections#9678)

Co-authored-by: Felix Fontein <[email protected]>

---------

Co-authored-by: Felix Fontein <[email protected]>
…s#9695)

* ensure the stream object is closed in main()

* add changelog frag

* Update plugins/modules/xml.py

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/modules/xml.py

Co-authored-by: Felix Fontein <[email protected]>

---------

Co-authored-by: Felix Fontein <[email protected]>
* Remove update_homebrew=False (it's the default)

* Fix handling of irregular cases (brew does lowercase normalization)

* Fix handling of tap with no public fallback

* Add changelog fragment

* Add missing cleanup step

* Fix typo

* Check re-install and re-uninstall too
Adding VRF support and documentation to the nmcli module

Signed-off-by: Andreas Karis <[email protected]>
* zfs_facts: set parameter "type" as a list

Plus minor readability improvements

* add changelog frag

* Update plugins/modules/zfs_facts.py

Co-authored-by: Felix Fontein <[email protected]>

---------

Co-authored-by: Felix Fontein <[email protected]>
…ble-collections#9698)

* Add parameter to disable removal of extra physical volumes

Signed-off-by: Massl123 <[email protected]>

* Set PR number in changelog fragment

Signed-off-by: Massl123 <[email protected]>

* Fix tests

Signed-off-by: Massl123 <[email protected]>

* Apply suggestions from code review

Co-authored-by: Felix Fontein <[email protected]>

* Add comment in pvs

Signed-off-by: Massl123 <[email protected]>

---------

Signed-off-by: Massl123 <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
…ns#6264)

* zfs: fix multi-line value in user-defined property

* zfs: fix multi-line value in user-defined property

* Update changelogs/fragments/6264-zfs-multiline-property-value.yml

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/modules/zfs.py

Co-authored-by: sam-lunt <[email protected]>

* rename self.properties -> self.extra_zfs_properties

---------

Co-authored-by: Vita Batrla <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
Co-authored-by: sam-lunt <[email protected]>
)

Fix 1Password Connect support for onepassword_doc.
* ipa_host: Maintain the host certificates

Fix ansible-collections#9693

* Add changelog fragment

* Fix changelog message

* Fix changelog message again
…nsible-collections#9722)

Cleanup AZP config similarly to ansible-core did some years ago.
* Add `FullPowerCycle` to Power commands

* Add changelog fragment

* Rename command

* Fix line length for redfish_command options
…lugin iocage (ansible-collections#9651)

* Add parameter hooks to inventory plugin iocage.

* Add changelog fragment.

* Update plugins/inventory/iocage.py

Co-authored-by: Felix Fontein <[email protected]>

* Parameter renamed to hooks_results

* Fix DOCUMENTATION YAML 4-space indentation.

* Fix DOCUMENTATION YAML 2-space indentation.

* Update changelogs/fragments/9651-iocage-inventory-hooks.yml

Co-authored-by: Felix Fontein <[email protected]>

* Add note about activated pool mountpoint.

---------

Co-authored-by: Felix Fontein <[email protected]>
* profitbricks: deprecation

* add changelog frag
@yeetypete yeetypete reopened this Feb 14, 2025
@yeetypete yeetypete closed this Feb 14, 2025
@yeetypete yeetypete deleted the feature/incus-nonroot-user branch February 14, 2025 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.