rreeves
September 26, 2015, 12:30am
1
Hello,
I want to test the new proxmox module for ansible 2.0. I followed the instructions for building and installing ansible from source. When I run my testing playbook it produces an error, any ideas on how I can get this thing working ?
`
ERROR! ‘proxmox’ is not a valid attribute for a Play
The error appears to have been in ‘/home/rreeves/git_repos/ansible-test-02/proxmox.yml’: line 3, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
Create new containers
name: Create test-system-01
^ here
`
this is my testing playbook
`
Brian_Coca
(Brian Coca)
September 26, 2015, 8:37pm
2
it cannot find the proxmox plugin, double check that it is installed
on your system.
rreeves
September 28, 2015, 7:51pm
3
Thanks do you happen to know where is the default install location for modules ?
Brian_Coca
(Brian Coca)
September 28, 2015, 8:05pm
4
that changes depending on how you isntalled
rreeves
September 28, 2015, 8:17pm
5
well I installed this from source following this guide.
https://valdhaus.co/writings/ansible-ubuntu-debian/
This is the only proxmox modules I could locate
find / | grep proxmox
/usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/modules/extras/cloud/misc/proxmox_template.py
/usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/modules/extras/cloud/misc/proxmox.py
/usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/modules/extras/cloud/misc/proxmox.pyc
/usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/modules/extras/cloud/misc/proxmox_template.pyc
Brian_Coca
(Brian Coca)
September 28, 2015, 8:20pm
6
I would have said you are missing a 'git submodule init --recursive'
step .. but then you would not have any modules, if you are running
python2.7 it should find these in the python path, otherwise just try
setting in ansible.cfg the path directly for core and extras to the
subdirs of /usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/modules
rreeves
September 28, 2015, 9:15pm
7
okay I have looked through ansible.cfg and changed this line
library = /usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/modules
sudo ansible --version
ansible 2.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = /usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/modules
still the same problem
ERROR! ‘proxmox’ is not a valid attribute for a Play
The error appears to have been in ‘/home/ops/proxmox.yml’: line 3, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
git submodule status
a4ac171a070551f1ed17a9c09b41d2481ad779af lib/ansible/modules/core (remotes/origin/revert-1564-win_features_improvements_v2-26-ga4ac171)
3c8c7168014234be339a42481d74f3954d47a4fc lib/ansible/modules/extras (heads/devel)
Is there a better source for installing the development environment ?
sivel
(sivel)
September 28, 2015, 9:28pm
8
The following command should give you the path to the modules:
python -c ‘import ansible.modules as m; print m.file ’
rreeves
September 28, 2015, 9:48pm
9
thanks for the tip, it is the same location that I have assigned to library
python -c ‘import ansible.modules as m; print m.file ’
/usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/modules/init .pyc
Brian_Coca
(Brian Coca)
September 28, 2015, 10:11pm
10
try:
library = /usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/modules/core:
/usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/modules/extras
rreeves
September 28, 2015, 10:20pm
11
with some testing it seems that the core modules do work… but still no luck with proxmox
/etc/ansible/ansible.cfg
inventory = /etc/ansible/hosts
library = /usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/modules/core: /usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/modules/extras
remote_tmp = $HOME/.ansible/tmp
pattern = *
forks = 5
poll_interval = 15
sudo_user = root
#ask_sudo_pass = True
#ask_pass = True
transport = smart
#remote_port = 22
module_lang = C
ansible --version
ansible 2.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = /usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/modules/core: /usr/local/lib/python2.7/dist-packages/ansible-2.0.0-py2.7.egg/ansible/modules/extras
ansible-playbook proxmox.yml
ERROR! ‘proxmox’ is not a valid attribute for a Play
The error appears to have been in ‘/home/ops/proxmox.yml’: line 3, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
Create new containers
proxmox: vmid=110 node=‘clawstah’ api_user=‘root@pam’ …
I haven’t gotten any further than this, I suspect other people are having this problem as well ? This doesn’t seem stable for now, I guess I will wait. Thanks for the help though