Hi,

My goal is to implement 2 separate playbooks from the root main.yml, 
however, I would like to execute the 2nd playbook only when the 1st gives a 
return code of 0.

---
- hosts: all

- import_playbook: sftp.yml

- import_playbook: reboot.yml


---
- hosts: sftp01

  tasks:
    - name: create file
      shell: touch /home/xxxxxxxxx/sftp_now

----
- hosts: remote

  tasks:

    - name: rebooting the remote test box
      reboot:
        test_command: whoami
      become: true

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/66d61ffb-aee5-46fa-889f-72dba9ac01fen%40googlegroups.com.

Reply via email to