Hi ! I would like to use a variable value for the playbook "hosts" clause,
eg.:
- name: PLAY_NAME
hosts: "{{myvariable}}"
sudo: yes
tasks:
.........
where the variable is defined elsewhere as eg.:
myvariable: "*1.domain*.com"
or:
myvariable: "group1:group2:group3"
However, when I attempt something like this, I always get the "skipping: no
hosts matched" message when running the playbook (even if I put myvariable:
"exact.host.name").
Is it at all possible to use a variable here? Putting the pattern itself to
every playbook is extremely unDRY, and driving me nuts.
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/50047158-c102-4458-aab5-85274eea8407%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.