fatal error 'is_ostree' is undefined in TASK [container-engine/containerd-common : containerd-common | gather os specific variables] #8673
Description
Environment:
-
Cloud provider or hardware configuration:
-
Vagrant 2.2.19
-
Box: ubuntu2004 & centos-bento both generating same error
-
OS (
printf "$(uname -srm)\n$(cat /etc/os-release)\n"
):
Same environment for host and guests
Linux 5.4.0-107-generic x86_64
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 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
):
I tried two versions and got the same error with both:
ansible [core 2.11.6]
config file = /home/olivier/Documents/kubespray/ansible.cfg
configured module search path = ['/home/olivier/Documents/kubespray/library']
ansible python module location = /home/olivier/Documents/kubespray/venv2/lib/python3.8/site-packages/ansible
ansible collection location = /home/olivier/.ansible/collections:/usr/share/ansible/collections
executable location = /home/olivier/Documents/kubespray/venv2/bin/ansible
python version = 3.8.5 (default, Sep 4 2020, 07:30:14) [GCC 7.3.0]
jinja version = 2.11.3
libyaml = True
ansible [core 2.12.3]
config file = /home/olivier/Documents/kubespray/ansible.cfg
configured module search path = ['/home/olivier/Documents/kubespray/library']
ansible python module location = /home/olivier/Documents/kubespray/venv/lib/python3.8/site-packages/ansible
ansible collection location = /home/olivier/.ansible/collections:/usr/share/ansible/collections
executable location = /home/olivier/Documents/kubespray/venv/bin/ansible
python version = 3.8.5 (default, Sep 4 2020, 07:30:14) [GCC 7.3.0]
jinja version = 2.11.3
libyaml = True
- Version of Python (
python --version
):
Python 3.8.5
Kubespray version (commit) (git rev-parse --short HEAD
):
1781eab
Network plugin used:
default
Full inventory with variables (ansible -i inventory/sample/inventory.ini all -m debug -a "var=hostvars[inventory_hostname]"
):
Default provided by Vagrantfile
Command used to invoke ansible:
Invoked via "vagrant up" and default Vagrantfile
Output of ansible run:
Full trace in gist: https://gist.github.com/oboudry/1dbebcd0ccb4f61894197b56be8fd378
Error message:
TASK [container-engine/containerd-common : containerd-common | gather os specific variables] *** fatal: [kub-1]: FAILED! => {"msg": "The conditional check 'not (is_ostree or (ansible_distribution == \"Flatcar Container Linux by Kinvolk\") or (ansible_distribution == \"Flatcar\"))' failed. The error was: error while evaluating conditional (not (is_ostree or (ansible_distribution == \"Flatcar Container Linux by Kinvolk\") or (ansible_distribution == \"Flatcar\"))): 'is_ostree' is undefined\n\nThe error appears to be in '/home/olivier/Documents/kubespray/roles/container-engine/containerd-common/tasks/main.yml': line 14, 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: containerd-common | gather os specific variables\n ^ here\n"}
Anything else do we need to know:
This error happens when applying strictly the "example use of vagrant" as documented in:
https://github.com/kubernetes-sigs/kubespray/blob/master/docs/vagrant.md#example-use-of-vagrant
I then tried to change the version of ansible, change the box used in Vagrant, and install ostree as it was listed as undefined in the error message and I thought it might be a pre-requisite. Nothing helped, I keep getting that same error message.