Forum breadcrumbs – You are here:Tracston Community Forum – DevOps, Micro Services, Cloud, Infrastructure, Development, Monitoring and more…DevOps / Micro Services / Automation: AnsibleAnsible playbook returns error: …
You need to log in to create posts and topics.
Ansible playbook returns error: true isn’t a bool
moshe@moshe
#1 · 26/10/2020, 4:34 pm
Quote from moshe on 26/10/2020, 4:34 pmProblem
When specifying true/ false for ansible playbook variables sometimes error can be occurred during runtime example:
“item”: {
“name”: “my_item”,
“value”: “true”
},
“msg”: “true isn’t a bool”
}Solution
Pass variable to ansible playbook util you need to specify: True with capital T and -e with Apostrophes
ansible-playbook -e “my_item=True”
Problem
When specifying true/ false for ansible playbook variables sometimes error can be occurred during runtime example:
“item”: {
“name”: “my_item”,
“value”: “true”
},
“msg”: “true isn’t a bool”
}
Solution
Pass variable to ansible playbook util you need to specify: True with capital T and -e with Apostrophes
ansible-playbook -e “my_item=True”
Click for thumbs down.0Click for thumbs up.0