Hi all,
Before using set_stats in Ansible Tower, I'm doing some test to understand
it.
I'm taking the hostname in playbook via set_stats but I cannot check if my
variable are correct.
Here's my script portion:
---
- hosts: all
gather_facts: yes
pre_tasks:
- name: get the hostname
set_stats:
data:
inv_host: "{{ inventory_hostname }}"
- name: get result
debug:
msg: "{{ inv_host}}"
[...]
And here's the result:
fatal: [xx.xx.xx.xx]: FAILED! => ... The error was: 'inv_host' is undefined
Is this module only works in Tower or should be run in 'normal' ansible too?
Do anyone has an idea about set_stats? I didn't really found information
about this module.
Thanks in advance and best regards,
H.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/63c876fd-c42d-48c9-8011-e2491c6cb43en%40googlegroups.com.