Environment:
Cloud provider or hardware configuration:
Bare-metal VMs
OS:
Linux 3.10.0-957.21.3.el7.x86_64 x86_64
NAME="Red Hat Enterprise Linux Server"
VERSION="7.6 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.6"
PRETTY_NAME="Red Hat Enterprise Linux"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.6:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.6
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.6"
Version of Ansible:
Ansible 2.7.10
Kubespray version (commit) (git rev-parse --short HEAD):
2.11 (86cc703)
Network plugin used:
Calico
Command used to invoke ansible:
Recommended command in README, but with relevant changes in inventory file/ssh key/nodes to remove
ansible-playbook -i inventory/mycluster/hosts.yml remove-node.yml -b -v \
--private-key=~/.ssh/private_key \
--extra-vars "node=nodename,nodename2"
Output of ansible run:
"The conditional check 'ansible_os_family not in
["CoreOS", "Container Linux by CoreOS"]' failed.
The error was: error while evaluating conditional
(ansible_os_family not in ["CoreOS", "Container Linux by CoreOS"]):
'ansible_os_family' is undefined
The error appears to have been in '/var/lib/awx/projects/_9__kubespray_211/roles/reset/tasks/main.yml': line 289, column 3,
but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: reset | Restart network
^ here"
Is it possible that this should be gather_facts: true? If so, I'm happy to submit a pull request.
- hosts: "{{ node | default('kube-node') }}"
gather_facts: no
roles:
- { role: kubespray-defaults }
- { role: reset, tags: reset, when: reset_nodes|default(True) }
Yes I'm seeing this too. Changing to gather_facts: yes fixes for me.
- hosts: "{{ node | default('kube-node') }}"
gather_facts: yes
Not tested, but fair to assume the same will occur when trying to remove a master.
Seems fixed to me, thanks!