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

fix: Detect hostvars with hostname #9

Merged
merged 1 commit into from
Apr 4, 2022
Merged

fix: Detect hostvars with hostname #9

merged 1 commit into from
Apr 4, 2022

Conversation

jouir
Copy link
Contributor

@jouir jouir commented Mar 31, 2022

When using the Ansible inventory, hostvars were expected to be found with the ansible_host variable (IP address or whatever), which is not always the case. With a basic inventory, when ansible_host is not defined, the hostname is used. This commit ensures hostvars can be found with the hostname (key) or with the ansible_host variable in the inventory.

When using the Ansible inventory, hostvars were expected to be found with the
`ansible_host` variable (IP address or whatever), which is not always the case.
With a basic inventory, when `ansible_host` is not defined, the hostname is
used. This commit ensures hostvars can be found with the hostname (key) or with
the `ansible_host` variable in the inventory.

Signed-off-by: Julien Riou <[email protected]>
@speed47 speed47 merged commit a79dc0d into ovh:main Apr 4, 2022
@jouir jouir deleted the hostvars branch April 4, 2022 17:02
wilfriedroset pushed a commit to wilfriedroset/the-bastion-ansible-wrapper that referenced this pull request Aug 30, 2022
Merge in SOC/bastion-ansible-wrapper from dev/julien.riou/inventory_cache to master

* commit '10dc34ce65654a09f736e34ef19b228f9e73b937':
  feat: Add Ansible inventory cache (ovh#7)
  feat: Use Python 3 interpreter (ovh#2) (ovh#8)
  fix: Detect hostvars with hostname (ovh#9)
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.

2 participants