incus_connection: Improve error handling (#10349)
Related to #10344
This tweaks the error handling logic to work with more versions of Incus
as well as catching some of the project and instance access errors.
The full context (instance name, project name and remote name) is now
included so that the user can easily diagnose access problems.
(cherry picked from commit 4195cbb364)
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Co-authored-by: Stéphane Graber <stgraber@stgraber.org>
incus_connection: Allow non-root users to connect to an instance (#9743)
* feat: add remote_user option to incus connection
* feat: add changelog fragment
* fix: formatting
(cherry picked from commit 94e1511005)
Co-authored-by: Peter Siegel <33677897+yeetypete@users.noreply.github.com>
plugins: replace to_native(), to_text(), str() with str() where possible or leave it away in f-string formatting (#9379)
* Replace to_native(), to_text(), str() with str() where possible or leave it away in f-string formatting.
* Improve formulation.
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
* Use more f-strings.
* Remove unicode prefix for strings.
---------
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
(cherry picked from commit 2203560867)
Co-authored-by: Felix Fontein <felix@fontein.de>
* Fixes inventory_hostname treatment as a litteral instead of inventory_hostname variable. Similar problem fixed in LXD: https://github.com/ansible-collections/community.general/pull/4912
* changelog for upsream
* Update changelogs/fragments/7874-incus_connection_treats_inventory_hostname_as_literal_in_remotes.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: travis <travis@cypressMini.local>
Co-authored-by: Felix Fontein <felix@fontein.de>