I'm trying to pass a variable into an Ansible playbook.
ansible-playbook script.yml --extra-vars "status=false"
Here is my playbook:
- name: Enable fact
set_fact:
facts: '{{ facts | combine({ "configured_status": "{{status}}" })}}'
vars:
facts: '{{ facts_raw.content|b64decode }}'
- debug:
var: facts
However, The debug output is:
"configured_status": "{{status}}"
Instead of:
"configured_status": "false"
Anyone knows what could be the issue?
Try
Why are you decoding facts? If you used slurp then