Thanks On Sunday, 21 March 2021 at 11:50:11 UTC danish09 wrote:
> 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/9bbdba5d-3271-4612-a8ed-631cf4ff7d75n%40googlegroups.com.
