Kubespray: Kubespray Kubernetes Cluster with GlusterFS - ERROR! no action detected in task

Created on 24 Jan 2018  路  4Comments  路  Source: kubernetes-sigs/kubespray

I'm trying to deploy GlusterFS with kubespray on an existing cluster, but running the corresponding ansible command i get an error on /contrib/network-storage/glusterfs/roles/kubernetes-pv/ansible/tasks/main.yaml file

Environment:

  • Cloud provider or hardware configuration:
    Scaleway
  • OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):
Linux 4.4.112-mainline-rev1 x86_64
NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
  • Version of Ansible :
    ansible 2.4.1.0

Kubespray version:
kubespray 0.5.2

Network plugin used:
calico

Copy of your inventory file:

master1 ansible_ssh_host=zzz.zzz.zzz.zzz ansible_user=root   
master2 ansible_ssh_host=yyy.yyy.yyy.yyy ansible_user=root   
worker1 ansible_ssh_host=iii.iii.iii.iii ansible_user=root
worker2 ansible_ssh_host=aaa.aaa.aaa.aaa ansible_user=root 
worker3 ansible_ssh_host=bbb.bbb.bbb.bbb ansible_user=root 

#GlusterFS nodes
gfs_node1 ansible_ssh_host=aaa.aaa.aaa.aaa  disk_volume_device_1=/dev/sda1  ip=x.x.x.x
gfs_node2 ansible_ssh_host=bbb.bbb.bbb.bbb  disk_volume_device_1=/dev/sda1  ip=v.v.v.v 


[kube-master]
master1
master2

[etcd]
master1
master2
worker1

[kube-node]
worker1
worker2
worker3

[k8s-cluster:children]
kube-node
kube-master

[gfs-cluster]
gfs_node1
gfs_node2

[network-storage:children]
gfs-cluster

_gfs_node1 corresponds to worker2
gfs_node2 corresponds to worker3
_

Command used to invoke ansible:
ansible-playbook -b --become-user=root -i ./inventory/inventory_glusterfs.cfg ./contrib/network-storage/glusterfs/glusterfs.yml -vvv

Output of ansible run:

ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

The error appears to have been in './contrib/network-storage/glusterfs/roles/kubernetes-pv/ansible/tasks/main.yaml': line 11, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Kubernetes Apps | Set GlusterFS endpoint and PV
  ^ here


The error appears to have been in './contrib/network-storage/glusterfs/roles/kubernetes-pv/ansible/tasks/main.yaml': line 11, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Kubernetes Apps | Set GlusterFS endpoint and PV
  ^ here

exception type: <class 'ansible.errors.AnsibleParserError'>
exception: no action detected in task. This often indicates a misspelled module name, or incorrect module path.

The error appears to have been in './contrib/network-storage/glusterfs/roles/kubernetes-pv/ansible/tasks/main.yaml': line 11, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: Kubernetes Apps | Set GlusterFS endpoint and PV
  ^ here

Most helpful comment

@joshuacox in my case the module kube.py was not found by ansible, adding the correct module path it worked perfectly.

All 4 comments

@VP2405 how did you fix this? I just ran into it myself.

EDIT: in my case I had forgotten to source ansible/hacking/env-setup and was using an older ansible, put that in .bashrc and now all is working again

@joshuacox in my case the module kube.py was not found by ansible, adding the correct module path it worked perfectly.

Creating a symlinki to the library folder or running ansible-playbook from the main directory fix the problem for me.

ansible-playbook -b -i /PATH_TO_YOU/hosts.ini /kubespray/contrib/network-storage/glusterfs/glusterfs.yml --private-key=~/.ssh/id_rsa

kubespray path must be the current directory

Was this page helpful?
0 / 5 - 0 ratings