Answer the question
In order to leave comments, you need to log in
Is it possible to include another ansible-playbook in ansible-playbook?
For example, there is an ansible-playbook that installs software (for example, installs only ELK), can you add another plabybook to this playbook (for example, in which general settings are stored, admins are created)?
Answer the question
In order to leave comments, you need to log in
---
- include: playbook1.yml
- name: Install Common software
hosts: "{{ host }}"
gather_facts: True
user: "{{ user }}"
become: true
roles:
- role: role1
- role: role2
- include: playbook2.yml
Use roles for these purposes. Then it will be easier to maintain the playbook. You create two roles, you will register them in the playbook. If necessary, you can use the roles in other playbooks.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question