Kubespray getting error: \"msg\": \"true isn\'t a bool\" for download_run_once
Problem
User gets the following error when trying to install kubernetes with kubespray and passing download_run_once parameter
TASK [kubernetes/preinstall : Stop if known booleans are set as strings (Use JSON format on CLI: -e “{‘key’: true }”)] **************************************************************************************************
failed: [node1] (item={u’name’: u’download_run_once’, u’value’: u’true’}) => {
“ansible_loop_var”: “item”,
“assertion”: “item.value|type_debug == ‘bool'”,
“changed”: false,
“evaluated_to”: false,
“item”: {
“name”: “download_run_once”,
“value”: “true”
},
“msg”: “true isn’t a bool”
}
Solution
kubespray for offline install is not accurate:
https://github.com/kubernetes-sigs/kubespray/blob/master/docs/downloads.md
https://github.com/kubernetes-sigs/kubespray/blob/master/docs/ansible.md
when passing variable to ansible playbook util you need to specify: True with capital T and -e with Apostrophes
ansible-playbook -e "download_run_once=True" -i hosts_file kubespray/playbooks/cluster.yml
Note
The same also for settings: -e download_localhost=true
We do this for a living.
Kubernetes, DevOps and platform engineering, delivered in days — not another weekend lost to a stack trace.
Start a project →