-
Notifications
You must be signed in to change notification settings - Fork 191
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
Use ansible_facts to reference facts #893
Conversation
Hi @GregWhiteyBialas. |
Sorry for this. Fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gj here! thanks for contributing to Wazuh!
They're still a file that need to be modified in order to be 100% compatible
https://github.com/wazuh/wazuh-ansible/blob/4.4/.github/playbooks/single-wazuh.yml
Oh, sorry for this! I didn't expect anything in there. God lesson for the future. Fixed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @GregWhiteyBialas ,
Sorry about requesting changes again, but after a deeper search, I found other variables that should be changed
ansible_hostname
toansible_facts.hostname
ansible_default_ipv4.address
toansible_facts.default_ipv4.address
Thanks again!
Hi @jnasselle |
I have squashed commits in this PR to, avoid clutter in history. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi @GregWhiteyBialas. |
3 similar comments
Hi @GregWhiteyBialas. |
Hi @GregWhiteyBialas. |
Hi @GregWhiteyBialas. |
@teddytpc1 I have signed commit with gpg, can we merge it ? |
Hi @teddytpc1 Is there something that I can do to push this forward ? |
Changes have been tested with the Demo deployment. It worked fine. |
This changes where merged on 4.4 branch and they're not present in master. Can you please move this changes into master? |
By default, Ansible injects a variable for every fact, prefixed with
ansible_. This can result in a large number of variables for each host,
which at scale can incur a performance penalty. Ansible provides a
configuration option [0] that can be set to False to prevent this
injection of facts. In this case, facts should be referenced via
ansible_facts..
This change updates all references to Ansible facts from using
individual fact variables to using the items in the
ansible_facts dictionary. This allows users to disable fact variable
injection in their Ansible configuration, which may provide some
performance improvement.
[0] https://docs.ansible.com/ansible/latest/reference_appendices/config.html#inject-facts-as-vars