Skip to content

Ansible


Ansible Playbook Variables

These are the variables that we are creating. There are two (not really) ways to keep the vars.

  • Keep the vars in vars/main.yml within a role.
  • Keep the vars in a single vars.yml file in the root of the project.
    • In playbook.yml add the following

      - name: Ansible playbook
        vars_files:
          - vars.yml
      

References: