ansible

how to end all ansible playbooks at once. can't do it with module meta


i have list of playbooks in site.yml, like this: - playbook1.yml - playbook2.yml in playbook1 i have this module:

- hosts: all
  name: failing
  tasks:
  - meta: end_play
    when:
    - fail_trigger == 1

But it ends only playbook1. Do you know how to end all playbooks in site.yml?


Solution

  • Q: "Do you know how to end all playbooks in site.yml?"

    A: A task in a play can't terminate any other play. The module meta provides end_host, end_batch, and end_play only. There is no end_playbook.

    The only options are to: