Re: [ansible-project] Get a list of --limit servers

2016-11-23 Thread 'J Hawkesworth' via Ansible Project
If you just want to make sure you are going to hit the right hosts before you run the playbook, use the --list-hosts command line parameter option of ansible-playbook. I use --list-hosts and --list-tasks a lot. Hope this helps, Jon -- You received this message because you are subscribed to

Re: [ansible-project] Get a list of --limit servers

2016-11-22 Thread bmccarthy
'play_hosts' doesn't work because the 'icinga2-ansible-add-hosts' role is only applied to "{{ hosts | default('monitoring_servers') }}" What I'm trying to get is the list of hosts that - hosts: all gather_facts: yes runs against, which is not all of the hosts in my inventory. On Tuesday,

Re: [ansible-project] Get a list of --limit servers

2016-11-22 Thread Brian Coca
​try the 'play_hosts' variable.​ -- Brian Coca -- 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 ansible-project+unsubscr...@googlegroups.com. To

[ansible-project] Get a list of --limit servers

2016-11-22 Thread bmccarthy
I'm using the icinga2-ansible-add-hosts role, which creates config files for each host. My playbook starts like this: --- - hosts: all gather_facts: True - hosts: "{{ hosts | default('monitoring_servers') }}" - strategy: debug - role: icinga2-ansible-add-hosts Inside the