FreeKB - ansible-playbook command - import_playbook
ansible-playbook command - import_playbook

Home > Search


import_playbook can be used to import one playbook into another playbook. A command uses of this is to have a master parent playbook that performs plays from child playbooks, like this.

- import_playbook: child.yml

 

Or like this.

- name: first child playbook
  import_playbook: child.yml

 

import_playbook cannot be run inside a task. For example, this would not work. include_tasks can be used to run a playbook within tasks.

- hosts: all
  tasks:
    import_playbook: child.yml

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 54e1d in the box below so that we can be sure you are a human.




Comments