??????????????
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Ñ d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d d
l Z d d
l
Z
d d
l Z d d
l Z d d
l
Z
d d l m Z d e f d
„ ƒ YZ d „ Z e d k rÍ e ƒ n d
S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust 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
AnsibleModulet Zonec B` sà e Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
d „ Z d
„ Z d „ Z
d „ Z d
„ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( c C` sÖ t | _ g | _ | | _ | j j d | _ | j j d | _ | j j d | _ | j j d | _ | j j d | _ | j j d | _
| j j d | _ | j j d | _ | j j d | _
| j j d
t ƒ | _ | j j d t ƒ | _ | j j d t ƒ | _ | j j r-| j j d
ƒ n t j ƒ d k rU| j j d d ƒ n t j ƒ j d ƒ \ | _ | _ t | j ƒ d k r¡| j j d d ƒ n t j d | j ƒ } | sÒ| j j d d ƒ n d S( Nt patht namet sparset
root_passwordt timeoutt configt create_optionst install_optionst attach_optionst zoneadmt zonecfgs
ssh-keygens Running in check modet SunOSt msgs This module requires Solarist .i
s( This module requires Solaris 10 or laters! ^[a-zA-Z0-9][-_.a-zA-Z0-9]{0,62}$sm Provided zone name is not a valid zone name. Please refer documentation for correct zone name specifications.( t Falset changedR t modulet paramsR
R R R
R R R R R t get_bin_patht Truet zoneadm_cmdt zonecfg_cmdt ssh_keygen_cmdt
check_modet appendt platformt systemt fail_jsont releaset splitt os_majort os_minort intt ret match( t selfR R, ( ( sG /usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyt __init__¢ s2 !c C` sT | j s | j j d d ƒ n | j j s7t j d t ƒ } | j rm | j d | j ƒ | j
j d ƒ n$ | j d | j ƒ | j
j d ƒ | j d | j ƒ | j d | j ƒ | j
ƒ d
| j | j | j f } | j j | ƒ \ } } } | d k r$| j j d d | | ƒ n t j | j ƒ n t | _ | j
j d
ƒ d S( NR s Missing required argument: patht deletes
create %s
s creating sparse-root zones
create -b %s
s creating whole-root zones set zonepath=%s
s %s
s %s -z %s -f %si s Failed to create zone. %ss zone configured( R
R R% R! t tempfilet NamedTemporaryFileR R t writeR R R" R t closeR R t run_commandt ost unlinkR R ( R- t tt cmdt rct outt err( ( sG /usr/lib/python2.7/site-packages/ansible/modules/system/solaris_zone.pyt configureÄ s&