I would like to build an ansible playbook and at this point I need some help.
I have my defaults:
variables:
module1: true
module2: false
module3: true
module4: true
I need now to find out which module key has a true-value and put the key name in my command
- name: Install Packages
command: {{ item }}
with_items:
- ./configure
The output should be something like this:
- name: Install Packages
command: {{ item }}
with_items:
- ./configure --module1 **--no**-module2 --module3 --module4
How can I get all this modules and build my configure command?
Thanks!