D
D
deudron2019-08-13 19:29:47
Ansible
deudron, 2019-08-13 19:29:47

What is the best way to organize role dependencies?

There is such a structure of roles:

roles/
  /app1
  /app2
  ...
  /appN
  /nginx-webserver
      templates/
         nginx_app_site.j2
  playbook_app1.yml
  playbook_app2.yml
  ...
  playbook_appN.yml

All applications are deployed on the same server.
The bottom line is to use the nginx_app_site.j2 template with different domains. That is, you need to call the nginx-webserver role with different domains from each playbook (nginx_domain: appN.com) . What is the best way to do this? Use import_role or call nginx-webserver as a separate role in the playbook along with the appN role?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question