The magic of run_once
There is a particular directive in the Ansible: run_once
. If it’s used at a play level, it’s the same as changing hosts: foo
to hosts: foo[0]
. Convenient, but not intriguing.
There is a second place to use it: in a task. Any task can have ‘run_once
’. And magic…