Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible_os_family is undefined #8090

Closed
slamdev opened this issue Oct 18, 2021 · 5 comments · May be fixed by 1Const1/kubespray#1
Closed

ansible_os_family is undefined #8090

slamdev opened this issue Oct 18, 2021 · 5 comments · May be fixed by 1Const1/kubespray#1
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@slamdev
Copy link

slamdev commented Oct 18, 2021

Environment:

  • OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):
Linux 5.4.0-88-generic x86_64 NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
  • Version of Ansible (ansible --version):
ansible 2.10.15
  config file = /opt/k8s-infra/kubespray/ansible.cfg
  configured module search path = ['/opt/k8s-infra/kubespray/kubespray/library']
  ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.8.10 (default, Sep 28 2021, 16:10:42) [GCC 9.3.0]
  • Version of Python (python --version):
Python 3.8.10

Kubespray version (commit) (git rev-parse --short HEAD): b83e8b0 (tag 2.17.0)

Command used to invoke ansible:

ansible-playbook remove-node.yml -e "node=worker-h1-1059205-204"

Output of ansible run:

fatal: [worker-h1-1059205-204]: FAILED! => {"msg": "The conditional check 'ansible_os_family not in [\"Flatcar Container Linux by Kinvolk\"]' failed. The error was: error while evaluating conditional (ansible_os_family not in [\"Flatcar Container Linux by Kinvolk\"]): 'ansible_os_family' is undefined\n\nThe error appears to be in '/opt/k8s-infra/kubespray/kubespray/roles/reset/tasks/main.yml': line 342, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: reset | Restart network\n  ^ here\n"}

Anything else do we need to know:

changing this field to yes fixed the problem:
https://github.com/kubernetes-sigs/kubespray/blob/v2.17.0/remove-node.yml#L32

@slamdev slamdev added the kind/bug Categorizes issue or PR as related to a bug. label Oct 18, 2021
@rtsp
Copy link
Member

rtsp commented Oct 29, 2021

Related to #7798 and #8009

1Const1 added a commit to 1Const1/kubespray that referenced this issue Nov 3, 2021
fix FAILED! => {"msg": "The conditional check 'ansible_os_family not in [\"Flatcar\", \"Flatcar Container Linux by Kinvolk\"]' failed. The error was: error while evaluating conditional (ansible_os_family not in [\"Flatcar\", \"Flatcar Container Linux by Kinvolk\"])

kubernetes-sigs#8090
kubernetes-sigs#7798
kubernetes-sigs#8009
@maxpain
Copy link
Contributor

maxpain commented Nov 28, 2021

Any updates?

@eakurdyukov
Copy link

Got the same problem on Centos 8, I use also 2.17.0 kubespray

NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"

@oomichi
Copy link
Contributor

oomichi commented Dec 4, 2021

#8231 has fixed this issue according to the both error messages on this issue and the pull request.

/close

@k8s-ci-robot
Copy link
Contributor

@oomichi: Closing this issue.

In response to this:

#8231 has fixed this issue according to the both error messages on this issue and the pull request.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
6 participants