I have simple play book for Solaris
- name: root access test
hosts: solaris
serial: "10"
tasks:
- name: Make nfs mount on a remote server
become: yes
delegate_facts: True
shell: mount -F nfs -o vers=3,soft,timeo=10 10.0.0.2:/export/store /media/nas
args:
executable: /bin/bash
~# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / ipkg shared
1 myzone running /rpool/zones/myzone ipkg excl
It working fine until you are in a global zone But now I need to execute the same playbook inside Solaris zone I don't have direct access to the zone over ssh I can only do:
- ssh to solaris@box
- solaris@box:~# sudo su -
- root@box:~# zlogin myzone
- root@myzone:~# mount -F nfs -overs=3,soft,timeo=10 10.0.0.2:/export/store /media/nas
Execute this command list inside a zone by using Ansible. Anyone has any experience with zone working before? Please share.