Difference between revisions of "Ansible import a play"

From MyWiki
Jump to: navigation, search
(Created page with "<source lang="yaml"> - hosts: localhost tasks: - debug: msg: play1 - name: Include a play after another play import_playbook: otherplays.yaml - name: This D...")
 
(No difference)

Latest revision as of 11:14, 6 October 2019

- hosts: localhost
  tasks:
    - debug:
        msg: play1

- name: Include a play after another play
  import_playbook: otherplays.yaml
 

- name: This DOES NOT WORK
  hosts: all
  tasks:
    - debug:
        msg: task1

    - name: This fails because I'm inside a play already
      import_playbook: stuff.yaml