What should current_host be replaced with so that the below only runs for
the host localhost?
---
- hosts: all
sudo: yes
tasks:
- name:play_hosts
debug: var=play_hosts
when: current_host == localhost
--
Xtratherm Limited is a limited company registered in Ireland. Registered
Hi,
I am a n00b and I am trying to create a CA playbook that first locally
creates certs, keys etc (using easy-rsa's pkitool) and then deploys these
to the different play_hosts. -I might be going about this the wrong way,
but is there a way to register the play_hosts in a list that can then be
-The problem with 'with_items: groups['all']' is that it takes that
directly from /etc/ansible/hosts rather than using whatever hosts-pattern
that was supplied on the command-line - i.e. '--limit somehosts'
# somehosts.yml
---
- hosts: all
sudo: yes
vars:
allhosts: {{
Hello,
I am aware that ansible saves a file with hosts that failed to play in
.ansible/, but if I set ignore_errors: True it doesn't seem to do this,
and more importantly I would like to get a list of the failed hosts while
playing, not wait until the play has finished... -Is this possible to