??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó àUdac@`sÑddlmZmZmZeZidd6dgd6dd6ZdZd Zdd l Z dd l Z dd l Z dd l Z dd l Z dd lmZd efd „ƒYZd„ZedkrÍeƒnd S(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust communityt supported_bys --- module: solaris_zone short_description: Manage Solaris zones description: - Create, start, stop and delete Solaris zones. - This module does not currently allow changing of options for a zone that is already been created. version_added: "2.0" author: - Paul Markham (@pmarkham) requirements: - Solaris 10 or 11 options: state: description: - C(present), configure and install the zone. - C(installed), synonym for C(present). - C(running), if the zone already exists, boot it, otherwise, configure and install the zone first, then boot it. - C(started), synonym for C(running). - C(stopped), shutdown a zone. - C(absent), destroy the zone. - C(configured), configure the ready so that it's to be attached. - C(attached), attach a zone, but do not boot it. - C(detached), shutdown and detach a zone type: str choices: [ absent, attached, configured, detached, installed, present, running, started, stopped ] default: present required: true name: description: - Zone name. - A zone name must be unique name. - A zone name must begin with an alpha-numeric character. - The name can contain alpha-numeric characters, underbars I(_), hyphens I(-), and periods I(.). - The name cannot be longer than 64 characters. type: str required: true path: description: - The path where the zone will be created. This is required when the zone is created, but not used otherwise. type: str sparse: description: - Whether to create a sparse (C(true)) or whole root (C(false)) zone. type: bool default: no root_password: description: - The password hash for the root account. If not specified, the zone's root account will not have a password. type: str config: description: - 'The zonecfg configuration commands for this zone. See zonecfg(1M) for the valid options and syntax. Typically this is a list of options separated by semi-colons or new lines, e.g. "set auto-boot=true;add net;set physical=bge0;set address=10.1.1.1;end"' type: str default: '' create_options: description: - 'Extra options to the zonecfg(1M) create command.' type: str default: '' install_options: description: - 'Extra options to the zoneadm(1M) install command. To automate Solaris 11 zone creation, use this to specify the profile XML file, e.g. install_options="-c sc_profile.xml"' type: str default: '' attach_options: description: - 'Extra options to the zoneadm attach command. For example, this can be used to specify whether a minimum or full update of packages is required and if any packages need to be deleted. For valid values, see zoneadm(1M)' type: str default: '' timeout: description: - Timeout, in seconds, for zone to boot. type: int default: 600 sˆ - name: Create and install a zone, but don't boot it solaris_zone: name: zone1 state: present path: /zones/zone1 sparse: True root_password: Be9oX7OSwWoU. config: 'set autoboot=true; add net; set physical=bge0; set address=10.1.1.1; end' - name: Create and install a zone and boot it solaris_zone: name: zone1 state: running path: /zones/zone1 root_password: Be9oX7OSwWoU. config: 'set autoboot=true; add net; set physical=bge0; set address=10.1.1.1; end' - name: Boot an already installed zone solaris_zone: name: zone1 state: running - name: Stop a zone solaris_zone: name: zone1 state: stopped - name: Destroy a zone solaris_zone: name: zone1 state: absent - name: Detach a zone solaris_zone: name: zone1 state: detached - name: Configure a zone, ready to be attached solaris_zone: name: zone1 state: configured path: /zones/zone1 root_password: Be9oX7OSwWoU. config: 'set autoboot=true; add net; set physical=bge0; set address=10.1.1.1; end' - name: Attach zone1 solaris_zone: name: zone1 state: attached attach_options: -u N(t AnsibleModuletZonecB`sàeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z d „Z d „Z d „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(cC`sÖt|_g|_||_|jjd|_|jjd|_|jjd|_|jjd|_|jjd|_ |jjd|_ |jjd|_ |jjd|_ |jjd |_ |jjd tƒ|_|jjd tƒ|_|jjd tƒ|_|jjr-|jjd ƒntjƒdkrU|jjddƒntjƒjdƒ\|_|_t|jƒdkr¡|jjddƒntjd|jƒ}|sÒ|jjddƒndS(Ntpathtnametsparset root_passwordttimeouttconfigtcreate_optionstinstall_optionstattach_optionstzoneadmtzonecfgs ssh-keygensRunning in check modetSunOStmsgsThis module requires Solarist.i s(This module requires Solaris 10 or laters!^[a-zA-Z0-9][-_.a-zA-Z0-9]{0,62}$smProvided zone name is not a valid zone name. Please refer documentation for correct zone name specifications.(tFalsetchangedRtmoduletparamsR R R R RRRRRt get_bin_pathtTruet zoneadm_cmdt zonecfg_cmdtssh_keygen_cmdt check_modetappendtplatformtsystemt fail_jsontreleasetsplittos_majortos_minortinttretmatch(tselfRR,((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyt__init__¢s2    !cC`sT|js|jjddƒn|jjs7tjdtƒ}|jrm|jd|j ƒ|j j dƒn$|jd|j ƒ|j j dƒ|jd|jƒ|jd |j ƒ|j ƒd |j|j|jf}|jj|ƒ\}}}|d kr$|jjdd ||ƒntj|jƒnt|_|j j d ƒdS(NRsMissing required argument: pathtdeletes create %s screating sparse-root zones create -b %s screating whole-root zonesset zonepath=%s s%s s%s -z %s -f %sisFailed to create zone. %sszone configured(R RR%R!ttempfiletNamedTemporaryFileRR twriteRRR"RtcloseRR t run_commandtostunlinkRR(R-tttcmdtrctoutterr((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyt configureÄs&      cC`sÃ|jjs¦d|j|j|jf}|jj|ƒ\}}}|dkrm|jjdd||ƒnt|jƒdkr|j ƒn|j ƒ|j ƒnt |_ |jjdƒdS(Ns%s -z %s install %siRsFailed to install zone. %si szone installed(RR!RR RR4R%R*R)tconfigure_sysidtconfigure_passwordtconfigure_ssh_keysRRRR"(R-R8R9R:R;((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pytinstallßs      cC`s–|jƒr’|jjsvd|j|jf}|jj|ƒ\}}}|dkrv|jjdd||ƒqvnt|_|j j dƒndS(Ns%s -z %s uninstall -FiRsFailed to uninstall zone. %sszone uninstalled( t is_installedRR!RR R4R%RRRR"(R-R8R9R:R;((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyt uninstallìs   ! cC`s:tjjd|jƒr0tjd|jƒntd|jdƒjƒtd|jdƒ}|j|jƒ|jƒtd|jdƒ}|jdƒ|jdƒ|jdƒ|jd ƒ|jd ƒ|jd ƒ|jd ƒ|jd ƒ|jdƒ|jdƒ|jdƒ|jdƒ|jƒdS(Ns%s/root/etc/.UNCONFIGUREDs%s/root/noautoshutdowntws%s/root/etc/nodenames%s/root/etc/.sysIDtool.states(1 # System previously configured? s 1 # Bootparams succeeded? s"1 # System is on a network? s11 # Extended network information gathered? s 0 # Autobinder succeeded? s1 # Network has subnets? s&1 # root password prompted for? s(1 # locale and term prompted for? s#1 # security policy in place s"1 # NFSv4 domain configured s'0 # Auto Registration Configured tvt100(R5R tisfileR6topenR3R2R (R-tnodetid((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyR=ös(             cC`sød|j}d|j}tjj|ƒs‡d|j|f}|jj|ƒ\}}}|dkr‡|jjdd||ƒq‡ntjj|ƒsôd|j|f}|jj|ƒ\}}}|dkrô|jjdd||ƒqôndS( Ns %s/root/etc/ssh/ssh_host_rsa_keys %s/root/etc/ssh/ssh_host_dsa_keys%s -f %s -t rsa -N ""iRsFailed to create rsa key. %ss%s -f %s -t dsa -N ""sFailed to create dsa key. %s(R R5RER RR4R%(R-t rsa_key_filet dsa_key_fileR8R9R:R;((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyR?s   ! cC`sßd|j}|jrÛt|dƒ}|jƒ}|jƒxctdt|ƒƒD]L}||jdƒ}|ddkrQ|j|ds      cC`sü|jjsßd|j|jf}|jj|ƒ\}}}|dkrg|jjdd||ƒnd}xotrÛ||jkr›|jjddƒntj d|jƒ}|dkrÁPnt j dƒ|d7}qpWnt|_ |j jdƒdS( Ns %s -z %s bootiRsFailed to boot zone. %ss"timed out waiting for zone to bootsGps -z %s -o args|grep "ttymon.*-d /dev/console" > /dev/null 2>/dev/nulli s zone booted(RR!RR R4R%RRR5R$ttimetsleepRRR"(R-R8R9R:R;telapsed((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pytboot1s        cC`s¹|jƒr|jƒn|jƒr2|jƒn|jjsœd|j|jf}|jj|ƒ\}}}|dkrœ|jj dd||ƒqœnt |_ |j j dƒdS(Ns%s -z %s delete -FiRsFailed to delete zone. %ss zone deleted(t is_runningtstopRARBRR!RR R4R%RRRR"(R-R8R9R:R;((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pytdestroyKs      ! cC`s‡|jjsjd|j|jf}|jj|ƒ\}}}|dkrj|jjdd||ƒqjnt|_|jj dƒdS(Ns %s -z %s haltiRsFailed to stop zone. %ss zone stopped( RR!RR R4R%RRRR"(R-R8R9R:R;((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyR]Xs  ! cC`s‡|jjsjd|j|jf}|jj|ƒ\}}}|dkrj|jjdd||ƒqjnt|_|jj dƒdS(Ns%s -z %s detachiRsFailed to detach zone. %ss zone detached( RR!RR R4R%RRRR"(R-R8R9R:R;((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pytdetachas  ! cC`s|jjspd|j|j|jf}|jj|ƒ\}}}|dkrp|jjdd||ƒqpnt|_|j j dƒdS(Ns%s -z %s attach %siRsFailed to attach zone. %ss zone attached( RR!RR RR4R%RRRR"(R-R8R9R:R;((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pytattachjs  ! cC`sId|j|jf}|jj|ƒ\}}}|dkrAtStSdS(Ns %s -z %s listi(RR RR4RR(R-R8R9R:R;((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pytexistsss  cC`s|jƒdkS(Ntrunning(R(R-((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyR\{scC`s|jƒdkS(Nt installed(R(R-((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyRA~scC`s|jƒdkS(Nt configured(R(R-((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyt is_configuredscC`sVd|j|jf}|jj|ƒ\}}}|dkrN|jdƒdSdSdS(Ns%s -z %s list -piRLit undefined(RR RR4R'(R-R8R9R:R;((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyR„s  cC`s7|jƒr|jjdƒn|jƒ|jƒdS(Nszone already exists(RaRR"R<R@(R-((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyt state_presentŒs  cC`s7|jƒ|jƒr)|jjdƒn |jƒdS(Nszone already running(RgR\RR"R[(R-((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyt state_running“s  cC`s0|jƒr|jƒn|jjddƒdS(NRszone does not exist(RaR]RR%(R-((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyt state_stoppedšs  cC`sF|jƒr2|jƒr%|jƒn|jƒn|jjdƒdS(Nszone does not exist(RaR\R]R^RR"(R-((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyt state_absent s     cC`s-|jƒr|jjdƒn |jƒdS(Nszone already exists(RaRR"R<(R-((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pytstate_configured¨s cC`sY|jƒs"|jjddƒn|jƒrA|jjdƒn|jƒ|jƒdS(NRszone does not existszone already detached(RaRR%ReRR"R]R_(R-((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pytstate_detached®s    cC`sL|jƒs|jjdƒn|jƒr8|jƒn|jjdƒdS(Nszone does not existszone already attached(RaRR"ReR`(R-((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pytstate_attached·s    (t__name__t __module__R.R<R@RBR=R?R>R[R^R]R_R`RaR\RAReRRgRhRiRjRkRlRm(((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyR ¡s0 "                cC`s"tdtdtdddtƒdtddddd d d d d dddddg ƒdtddƒdtdddtƒdtdddtƒdtddddƒdtddddƒdtddddƒdtddddƒdtddddƒƒ dtƒ}t|ƒ}|jd}|dks6|dkrC|jƒn¶|dks[|dkrh|jƒn‘|dkr|jƒnx|d krš|j ƒn_|d kr³|j ƒnF|d krÌ|j ƒn-|d krå|j ƒn|j d d!|ƒ|jd"|jd d#j|jƒƒdS($Nt argument_specR ttypetstrtrequiredtstatetdefaulttpresenttchoicestabsenttattachedRdtdetachedRcRbtstartedtstoppedR R tboolR tno_logRR*iXRtRRRtsupports_check_modeRsInvalid state: %sRs, (RtdictRRR RRhRgRiRjRkRlRmR%t exit_jsonRRQR(RtzoneRt((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pytmainÀs@$               t__main__(t __future__RRRRqt __metaclass__tANSIBLE_METADATAt DOCUMENTATIONtEXAMPLESR5R#R+R0RXtansible.module_utils.basicRtobjectR R„Rn(((sG/usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyts"   U5     ÿ *