Proxmox module not recognized in playbook ? - Ansible 2.0

768 views
Skip to first unread message

rre...@phone.com

unread,
Sep 25, 2015, 8:45:18 PM9/25/15
to Ansible Project
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

---
# Create new containers
- name: Create test-system-01
  proxmox
: vmid=110 node='cluster001' api_user='root@pam' api_password='test1234' api_host='proxmox01' password='password1234' hostname='test-system-01' ostemplate='local:iso/ubuntu-14.04.3-server-amd64.iso'


- name: Create test-system-02
  proxmox
: vmid=111 node='cluster001' api_user='root@pam' api_password='test1234' api_host='proxmox02' password='password1234' hostname='test-system-02' ostemplate='local:iso/ubuntu-14.04.3-server-amd64.iso



checking version

ansible 2.0.0
  config file = 
  configured module search path = None




Brian Coca

unread,
Sep 26, 2015, 4:37:54 PM9/26/15
to Ansible Project
it cannot find the proxmox plugin, double check that it is installed
on your system.
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/566d923f-9324-4d85-b9d9-9c02e7dc360c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Brian Coca

rre...@phone.com

unread,
Sep 28, 2015, 3:51:32 PM9/28/15
to Ansible Project
Thanks do you happen to know where is the default install location for modules ?

Brian Coca

unread,
Sep 28, 2015, 4:05:19 PM9/28/15
to Ansible Project
that changes depending on how you isntalled



--
Brian Coca

rre...@phone.com

unread,
Sep 28, 2015, 4:17:54 PM9/28/15
to Ansible Project
well I installed this from source following this guide.


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

unread,
Sep 28, 2015, 4:21:00 PM9/28/15
to Ansible Project
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


--
Brian Coca

rre...@phone.com

unread,
Sep 28, 2015, 5:15:37 PM9/28/15
to Ansible Project
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 ? 

Matt Martz

unread,
Sep 28, 2015, 5:29:14 PM9/28/15
to ansible...@googlegroups.com
The following command should give you the path to the modules:

python -c 'import ansible.modules as m; print m.__file__'


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Matt Martz
@sivel
sivel.net

rre...@phone.com

unread,
Sep 28, 2015, 5:48:20 PM9/28/15
to Ansible Project
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

unread,
Sep 28, 2015, 6:11:18 PM9/28/15
to Ansible Project
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




--
Brian Coca

rre...@phone.com

unread,
Sep 28, 2015, 6:20:46 PM9/28/15
to Ansible Project
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' ................................................

rre...@phone.com

unread,
Oct 1, 2015, 3:10:56 PM10/1/15
to Ansible Project
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
Reply all
Reply to author
Forward
0 new messages