Re: [ansible-project] Usage of the zone plugin

2018-08-18 Thread Tim Shaw
Thanks for the suggestion Kai. 

I had noticed that, so I went and had a look at the source code for the plugin. 
The check for running as root is one of the first things the plugin does before 
anything has been pushed to the remote system. This leads me to think that I 
should have Ansible installed on my Solaris systems - which is something I 
don't want to do.

My thinking was that the framework would push the required scripts to the zone 
host then execute them.

Cheers
Tim.

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/191cb464-a538-422a-9e85-51403ad444d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Usage of the zone plugin

2018-08-16 Thread Tim Shaw
Hi,

I'm attempting to use the zone plugin to connect to Solaris 11 zones to 
re-configure the primary network.

Here's my test inventory file;

[playpen]
localhost
e7812svsun003

[my-zones]
e7812svsun031 ansible_zone_host=e7812svsun003


and here's my test playbook;
---
- hosts: my-zones
  gather_facts: no

  tasks:
- name: Hello
  connection: zone
  command: /usr/sbin/ipadm

And here's what I get when I run the playbook;

[asgadmin@e7812svint026 workspace]$ ansible-playbook -vvv -i myinventory 
ztest.pb -bKk
ansible-playbook 2.6.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = 
[u'/home/asgadmin/.ansible/plugins/modules', 
u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 2.7.5 (default, Apr 11 2018, 17:41:36) [GCC 4.8.5 
20150623 (Red Hat 4.8.5-28.0.1)]
Using /etc/ansible/ansible.cfg as config file
SSH password:
SUDO password[defaults to SSH password]:
Parsed /home/asgadmin/workspace/myinventory inventory source with ini plugin

PLAYBOOK: ztest.pb 
*
1 plays in ztest.pb

PLAY [my-zones] 

META: ran handlers

TASK [Hello] 
***
task path: /home/asgadmin/workspace/ztest.pb:6
fatal: [e7812svsun031]: FAILED! => {
"msg": "zone connection requires running as root"
}
to retry, use: --limit @/home/asgadmin/workspace/ztest.retry

PLAY RECAP 
*
e7812svsun031  : ok=0changed=0unreachable=0failed=1


I was under the impression that the zone plugin would connect to the 
ansible_zone_host  then set up the connection to the zone - effectively 
working in a proxy fashion.
Have I completely misunderstood how the zone plugin works?

Thanks
Tim

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/17899ee3-ec33-4b8c-b112-ae36091a84ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.