Ansible best practice for passing vars to nested playbooks?

后端 未结 2 1015
灰色年华
灰色年华 2021-01-20 06:11

So I am trying to wrap my head around Ansible and building a simple LEMP stack. I decided to work with a nested playbook because I want to compartmentalize as much as possib

2条回答
  •  鱼传尺愫
    2021-01-20 06:33

    A good solution is you have a vars.yml.dist file with examples of the variables that can be set. This exists in you repository and developers would simply make a local copy of vars.yml based on this. Then simply add the following to the your playbook: include: vars.yml This allows you to pass in variables to your roles, nested or not.

提交回复
热议问题