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

The task includes an option with an undefined variable #97

Closed
nleo opened this issue Nov 28, 2017 · 5 comments
Closed

The task includes an option with an undefined variable #97

nleo opened this issue Nov 28, 2017 · 5 comments

Comments

@nleo
Copy link

nleo commented Nov 28, 2017

After change openvpn_unified_client_profiles from no to yes got error

TASK [Stouts.openvpn : Set client cert and CA info as fact.] *******************
fatal: [xxx]: FAILED! => {"failed": true, "msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'content'\n\nThe error appears to have been in '/home/user/.ansible/roles/Stouts.openvpn/tasks/read-client-files.yml': line 30, 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: Set client cert and CA info as fact.\n  ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: 'dict object' has no attribute 'content'"}

Local machine

Linux netbook 4.8.0-53-generic #56~16.04.1-Ubuntu SMP Tue May 16 01:14:44 UTC 2017 i686 i686 i686 GNU/Linux
ansible 2.4.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]

Server

Ubuntu 16.04.3 LTS
Python 3.5.2
@gnasr
Copy link

gnasr commented Dec 9, 2017

same issue here
osx sierra

ansible 2.3.2.0
  python version = 2.7.14 (default, Sep 25 2017, 09:53:22) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]

@b1tst0rm
Copy link

b1tst0rm commented Dec 18, 2017

Having the exact same issue on Ubuntu 16.04.3 LTS with Python 3.5. Fixed by either not using unified profiles OR setting openvpn_tls_auth: true when using unified profiles.

@kwach
Copy link

kwach commented Dec 19, 2017

+1

@gnasr
Copy link

gnasr commented Dec 19, 2017

This PR solves this issue #88 i forked this repo and merged it

@nleo
Copy link
Author

nleo commented Dec 24, 2017

So, I need some simple OpenVPN installation without passwords, only ovpn files with integrated certificates. And I use this https://github.com/Nyr/openvpn-install to install and initial config of OpenVPN server and make some ansible tasks myself to tweak it and add users.

For me issue resolved)

@nleo nleo closed this as completed Dec 24, 2017
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

4 participants