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

Syntax problem: - name: unseal vault #2764

Closed
lvthillo opened this issue May 11, 2018 · 17 comments
Closed

Syntax problem: - name: unseal vault #2764

lvthillo opened this issue May 11, 2018 · 17 comments

Comments

@lvthillo
Copy link
Contributor

lvthillo commented May 11, 2018

Ansible 2.5.2 on OSX Sierra (nodes are Centos7)

command:
> ansible-playbook -i inventory/mycluster/hosts.ini cluster.yml

error:

The error appears to have been in '/xx/kubernetes-project/kubespray/roles/vault/handlers/main.yml': line 44, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


- name: unseal vault
  ^ here

It works when I checkout a specific release: (v2.5.0)

@harrycain72
Copy link

the last commit working is e23fd5c

@woopstar
Copy link
Member

woopstar commented May 14, 2018

@mattymo We now have a very strong dependency on the ansible vault module. My setup also fails now with this error.

I see the issue now that our docs has no reference to the requirements.txt and a pre-task before setting up the cluster, you need to do a sudo pip install -r requirements.txt

@chmuri
Copy link

chmuri commented May 14, 2018

Yes after sudo pip install -r requirements.txt Now is working fine.

@dmick
Copy link

dmick commented May 15, 2018

As far as I know, I didn't request vault mode, but I'm also getting this error; surely vault mode is not required now? Edit: no, but Ansible insists on loading and parsing files, including verifying module names, even if the code in those files is never executed. I'm sure there's a good reason for this.

I commented out the hashicorp_vault-requiring task, and was able to proceed

@bocob
Copy link

bocob commented Jun 6, 2018

I have exact same problem... sudo pip install -r requirements.txt did not help...

Requirement already satisfied: ansible>=2.4.0 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 1)) (2.5.4)
Requirement already satisfied: jinja2>=2.9.6 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 2)) (2.10)
Requirement already satisfied: netaddr in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 3)) (0.7.18)
Requirement already satisfied: pbr>=1.6 in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 4)) (3.1.1)
Requirement already satisfied: ansible-modules-hashivault>=3.9.4 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 5)) (3.9.5)
Requirement already satisfied: hvac in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 6)) (0.5.0)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/lib/python2.7/dist-packages (from jinja2>=2.9.6->-r requirements.txt (line 2)) (0.23)
Requirement already satisfied: requests>=2.7.0 in /usr/lib/python2.7/dist-packages (from hvac->-r requirements.txt (line 6)) (2.18.4)

@oanogin
Copy link

oanogin commented Jun 8, 2018

@bocob the same issue
it worked for me after "sudo pip3 install -r requirements.txt"

@arrowcircle
Copy link

I also have this problem.

I use mac os x latest version.
I installed ansible via brew.

I tried both sudo and regular pip install -r requiremets.txt. I also tried same command with pip3. Ring no bells.

How can I solve this problem?

@ekcheu
Copy link

ekcheu commented Jun 21, 2018

I think one issue is that ansible-modules-hashivault module does not appear to install correctly on some platforms.. at least it did not for mine. using
python
then help(), and then modules to list out the modules and I find that ansible-modules-hashivault is not listed. Trying to create a test.yml file to test to see whether or not hashivault's functions shows that this module simply is not loading. Some people have suggested using the pip version of ansible instead of the package, but I have found that, that creates conflicts in some files.
ansible, btw, on redhat references python2 if you do a:
more /usr/bin/ansible
So updating python3 won't help unless you change ansible to use python3.

@ekcheu
Copy link

ekcheu commented Jun 21, 2018

turns out in my case ansible-modules-hashivault was not installing the hashivault files underneath:
/usr/lib/python2.7/site-packages/ansible/modules
So I had to do:
cp -rp ansible-modules-hashivault-3.9.5/ansible/modules/hashivault /usr/lib/python2.7/site-packages/ansible/modules
And then I was able to get farther...
I still have some errors, but they are unrelated to this issue.

@rockymadden
Copy link

rockymadden commented Jun 22, 2018

@arrowcircle I was in the same boat. What finally worked for me was:

  • Uninstalled ansible from brew
  • Installed ansible via pip install ansible
  • Uninstalled hashivault via pip uninstall ansible-modules-hashivault
  • Installed hashivault via pip install ansible-modules-hashivault (it claimed it was installed prior, no idea)

No sudo on any of those. I also ensured brew doctor was nice and clean.

@mobilitie
Copy link

@arrowcircle Since you are using MAC - few binaries installed with sudo might not have right permissions.
Try using "sudo ansible-playbook -i inventory/mycluster/hosts.ini cluster.yml"

@usego
Copy link

usego commented Aug 12, 2018

Copying /usr/local/lib/python2.7/dist-packages/ansible/modules/hashivault to /usr/lib/python2.7/dist-packages/ansible/modules on AWS Ubuntu 16.04 image made a fix for me

@kairok
Copy link

kairok commented Aug 22, 2018

Yes! ansible-modules-hashivault module does not appear to install correctly.
Open file requirements.txt
Then change row "ansible-modules-hashivault>=3.9.4" to "ansible-modules-hashivault"
Then sudo pip install -r requirements.txt
Its Work for me.

@CCob
Copy link

CCob commented Oct 13, 2018

@bocob the same issue
it worked for me after "sudo pip3 install -r requirements.txt"

This worked for me on Ubuntu 18.04 too, after install pip3 which was missing also

@MatthiasLohr
Copy link

For me this problem was solved by using python2.7 instead of python3.

@piwi3910
Copy link

piwi3910 commented Nov 1, 2018

suddenly started to happen from today, nothing changed on the hosts. Tried all the different items above.
Anyway to just comment out somewhere the vault stuff?

@girindrag
Copy link

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

The error appears to have been in '/home/vagrant/kubespray/roles/container-engine/cri-o/tasks/main.yaml': line 39, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  • name: reboot in Fedora 31+
    ^ here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests