Hi all,
I have a playbook that receives a paramer and based in this we need to set a second variable to stablich the number of instances running.
I have used set_fact several times in task and roles such as:
- set_fact: int_serial_mode=1
- set_fact:
int_serial_mode: 3
when: serial_mode is defined
but if you move to the playbook the following error in produced:
Using /etc/ansible/ansible.cfg as config file
Vault password:
ERROR! ‘set_fact’ is not a valid attribute for a Play
The error appears to have been in ‘/home/admpablofbo/ptransible/ptrevo/mw_ptr_wls_start_servers.yml’: line 6, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
so we can not use set_fact in playbook.
is there any way to use “something similar” to set_fact in playbook. we need to do at playbook level as serial is stablished at this level.
any help wellcome!
best regards, Pablo.