Skip to content

fatal error 'is_ostree' is undefined in TASK [container-engine/containerd-common : containerd-common | gather os specific variables] #8673

Closed
@oboudry

Description

Environment:

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.

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions