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

lxc: fix remote_addr default to inventory_hostname #7104

Merged
merged 2 commits into from
Aug 13, 2023
Merged

lxc: fix remote_addr default to inventory_hostname #7104

merged 2 commits into from
Aug 13, 2023

Conversation

corubba
Copy link
Contributor

@corubba corubba commented Aug 13, 2023

SUMMARY

Ansible currently prints a warning when not explicitly defining one of the lxc remote_addr parameter variables and the fallback to inventory_hostname is used.

[WARNING]: The "lxc" connection plugin has an improperly configured remote target value, forcing "inventory_hostname" templated value instead of the string

This PR implements the same solution as ansible/ansible#77844, defining inventory_hostname as the lowest-priority variable for the remote_addr parameter.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lxc

ADDITIONAL INFORMATION

Encountered, fixed and tested with:

$ ansible --version
ansible [core 2.14.3]
  config file = None
  configured module search path = ['/home/corubba/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/corubba/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True

@corubba corubba marked this pull request as ready for review August 13, 2023 11:28
@ansibullbot ansibullbot added bug This issue/PR relates to a bug connection connection plugin new_contributor Help guide this first time contributor plugins plugin (any type) labels Aug 13, 2023
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-6 labels Aug 13, 2023
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@felixfontein felixfontein merged commit eafdf87 into ansible-collections:main Aug 13, 2023
@patchback
Copy link

patchback bot commented Aug 13, 2023

Backport to stable-6: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-6/eafdf87b1bdeb14133194e2ad41df5e46350dd2b/pr-7104

Backported as #7108

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Aug 13, 2023
patchback bot pushed a commit that referenced this pull request Aug 13, 2023
* lxc: fix remote_addr default to inventory_hostname

* Update changelogs/fragments/7104_fix_lxc_remoteaddr_default.yml

---------

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit eafdf87)
@patchback
Copy link

patchback bot commented Aug 13, 2023

Backport to stable-7: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-7/eafdf87b1bdeb14133194e2ad41df5e46350dd2b/pr-7104

Backported as #7109

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein
Copy link
Collaborator

@corubba thanks!

patchback bot pushed a commit that referenced this pull request Aug 13, 2023
* lxc: fix remote_addr default to inventory_hostname

* Update changelogs/fragments/7104_fix_lxc_remoteaddr_default.yml

---------

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit eafdf87)
@corubba
Copy link
Contributor Author

corubba commented Aug 13, 2023

@felixfontein and thank you for that lighting-fast merge!

felixfontein pushed a commit that referenced this pull request Aug 13, 2023
…o inventory_hostname (#7108)

lxc: fix remote_addr default to inventory_hostname (#7104)

* lxc: fix remote_addr default to inventory_hostname

* Update changelogs/fragments/7104_fix_lxc_remoteaddr_default.yml

---------

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit eafdf87)

Co-authored-by: Corubba <[email protected]>
felixfontein pushed a commit that referenced this pull request Aug 13, 2023
…o inventory_hostname (#7109)

lxc: fix remote_addr default to inventory_hostname (#7104)

* lxc: fix remote_addr default to inventory_hostname

* Update changelogs/fragments/7104_fix_lxc_remoteaddr_default.yml

---------

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit eafdf87)

Co-authored-by: Corubba <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug connection connection plugin new_contributor Help guide this first time contributor plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants