Hey,
I want to be able to use a playbook to run a task on host1 then run a task on localhost(ansible host) and then run another task on host1
Is that supposed to be as simple as copying something like this and changing the hostname and the task that comes after that?
Is there a better way to do so?
-
name: TASKNAME
hosts: host1
tasks: -
name: TASK ON HOST1
shell: -
name: TASKNAME
hosts: localhost
tasks: -
name: TASK ON LOCALHOST
shell: -
name: TASKNAME
hosts: host1
tasks: -
name: ANTOHER TASK ON HOST1
shell: