Environment:
CoreOS
Ansible version
ansible 2.4.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/prateek/library']
ansible python module location = /home/prateek/.local/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.13 (default, Nov 24 2017, 17:33:09) [GCC 6.3.0 20170516]
Kubespray version - 0.5.2
Network plugin used: weave
Copy of your inventory file:
[kube-master]
k8s-dugout-rgpoug
k8s-dugout-ocnwm8
[all]
k8s-dugout-rgpoug ansible_ssh_host=10.14.0.5
k8s-dugout-ocnwm8 ansible_ssh_host=10.14.0.6
k8s-dugout-wxn3oi ansible_ssh_host=10.14.0.7
[k8s-cluster:children]
kube-node
kube-master
[kube-node]
k8s-dugout-rgpoug
k8s-dugout-ocnwm8
k8s-dugout-wxn3oi
[etcd]
k8s-dugout-rgpoug
k8s-dugout-ocnwm8
k8s-dugout-wxn3oi
Command used to invoke ansible: kubespray deploy --gce --coreos
Output of ansible run:
prateek@austin:~$ kubespray deploy --gce
Identity added: /home/prateek/.ssh/id_rsa (/home/prateek/.ssh/id_rsa)
CHECKING SSH CONNECTIONS **********************************************
/usr/bin/ansible --ssh-extra-args -o StrictHostKeyChecking=no -u prateek -b --become-user=root -m ping all -i /home/prateek/.kubespray/inventory/inventory.cfg
k8s-dugout-ocnwm8 | FAILED! => {
"changed": false,
"failed": true,
"module_stderr": "Shared connection to 10.142.0.6 closed.\r\n",
"module_stdout": "/bin/sh: /usr/bin/python: No such file or directory\r\n",
"msg": "MODULE FAILURE",
"rc": 0
}
k8s-dugout-wxn3oi | FAILED! => {
"changed": false,
"failed": true,
"module_stderr": "Shared connection to 10.142.0.7 closed.\r\n",
"module_stdout": "/bin/sh: /usr/bin/python: No such file or directory\r\n",
"msg": "MODULE FAILURE",
"rc": 0
}
k8s-dugout-rgpoug | FAILED! => {
"changed": false,
"failed": true,
"module_stderr": "Shared connection to 10.142.0.5 closed.\r\n",
"module_stdout": "/bin/sh: /usr/bin/python: No such file or directory\r\n",
"msg": "MODULE FAILURE",
"rc": 0
}
Anything else do we need to know:
Basically using the kubespray CLI it is omitting the bootstrap-coreos playbook and directly going to ping the hosts.
If i try to run the ansible-playbook command I get playbook syntax error:-
prateek@austin:~$ ansible-playbook -u prateek -b --become-user=root -e ansible_python_interpreter=/opt/bin/python -i /home/prateek/.kubespray/inventory/inventory.cfg /home/prateek/.kubespray/roles/bootstrap-os/tasks/bootstrap-coreos.yml
ERROR! 'failed_when' is not a valid attribute for a PlayThe error appears to have been in '/home/prateek/.kubespray/roles/bootstrap-os/tasks/bootstrap-coreos.yml': line 2, column 3, but may
be elsewhere in the file depending on the exact syntax problem.The offending line appears to be:
- name: Bootstrap | Check if bootstrap is needed
^ here
I have CoreOS booted with OpenStack and same thing happen when I run Kubespray Ansible playbook (using v.2.4.0)
Same on baremetal with CoreOS, have to add ansible_python_interpreter: /opt/bin/python manually in all.yml.
Have you confirgured bootstrap_os: coreos ?
Yes i have. Why close this without waiting for my answer?
"kubespray cli is deprecated" -> What do you mean?
@verwilst could you open a new issue?
"CoreOS bootstrap fails in case of GCE cloud"
Coreos is working on GCE, it's getting deployed on every PR several times. If there is a particular issue to investigate on baremetal, you should provide more information.
Issues using kubespray-cli, should be opened on its repo, but it's no more maintained.
Most helpful comment
Same on baremetal with CoreOS, have to add
ansible_python_interpreter: /opt/bin/pythonmanually in all.yml.