1

I have a small playbook that is using variables based on a file.

Main.yml the file will always exist while second.yml might exist.

  1. Is it possible to configure the playbook to continue in case second.yml file does not exist?

  2. If I will add to the main.yml the value of Additional_file: yes, Can I configure the playbook to load second.yml only in case Additional_file value = yes

β.εηοιτ.βε
  • 33,893
  • 13
  • 69
  • 83
dzbeda
  • 173
  • 2
  • 9
  • 4
    `var_files`, being a directive, won't allow you that. The `include_vars` module on the other hand will. This is extensively covered in this question: [ansible vars\_files vs include\_vars](https://stackoverflow.com/questions/53253879/ansible-vars-files-vs-include-vars) – β.εηοιτ.βε Jul 18 '21 at 19:03

0 Answers0