??????????????
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@`sVddlmZmZmZeZidd6dgd6dd6ZdZd Zd Z dd l m Z dd l Z dd l Z dd lZd ddddgaddddgattdddddgZdd„Zd„Zd„Zd„Zd „Zd!„Zd"„Zd#„Zd d$„Zd%„Zd&„Zd'„Zed(krReƒnd S()i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust communityt supported_bysõ --- author: - Fabrizio Colonna (@ColOfAbRiX) module: parted short_description: Configure block device partitions version_added: "2.3" description: - This module allows configuring block device partition using the C(parted) command line tool. For a full description of the fields and the options check the GNU parted manual. requirements: - This module requires parted version 1.8.3 and above. - If the version of parted is below 3.1, it requires a Linux version running the sysfs file system C(/sys/). options: device: description: The block device (disk) where to operate. type: str required: True align: description: Set alignment for newly created partitions. type: str choices: [ cylinder, minimal, none, optimal ] default: optimal number: description: - The number of the partition to work with or the number of the partition that will be created. - Required when performing any action on the disk, except fetching information. type: int unit: description: - Selects the current default unit that Parted will use to display locations and capacities on the disk and to interpret those given by the user if they are not suffixed by an unit. - When fetching information about a disk, it is always recommended to specify a unit. type: str choices: [ s, B, KB, KiB, MB, MiB, GB, GiB, TB, TiB, '%', cyl, chs, compact ] default: KiB label: description: Creates a new disk label. type: str choices: [ aix, amiga, bsd, dvh, gpt, loop, mac, msdos, pc98, sun ] default: msdos part_type: description: - May be specified only with 'msdos' or 'dvh' partition tables. - A C(name) must be specified for a 'gpt' partition table. - Neither C(part_type) nor C(name) may be used with a 'sun' partition table. type: str choices: [ extended, logical, primary ] default: primary part_start: description: - Where the partition will start as offset from the beginning of the disk, that is, the "distance" from the start of the disk. - The distance can be specified with all the units supported by parted (except compat) and it is case sensitive, e.g. C(10GiB), C(15%). type: str default: 0% part_end : description: - Where the partition will end as offset from the beginning of the disk, that is, the "distance" from the start of the disk. - The distance can be specified with all the units supported by parted (except compat) and it is case sensitive, e.g. C(10GiB), C(15%). type: str default: 100% name: description: - Sets the name for the partition number (GPT, Mac, MIPS and PC98 only). type: str flags: description: A list of the flags that has to be set on the partition. type: list state: description: - Whether to create or delete a partition. - If set to C(info) the module will only return the device information. type: str choices: [ absent, present, info ] default: info notes: - When fetching information about a new disk and when the version of parted installed on the system is before version 3.1, the module queries the kernel through C(/sys/) to obtain disk information. In this case the units CHS and CYL are not supported. sO partition_info: description: Current partition information returned: success type: complex contains: device: description: Generic device information. type: dict partitions: description: List of device partitions. type: list sample: { "disk": { "dev": "/dev/sdb", "logical_block": 512, "model": "VMware Virtual disk", "physical_block": 512, "size": 5.0, "table": "msdos", "unit": "gib" }, "partitions": [{ "begin": 0.0, "end": 1.0, "flags": ["boot", "lvm"], "fstype": "", "name": "", "num": 1, "size": 1.0 }, { "begin": 1.0, "end": 5.0, "flags": [], "fstype": "", "name": "", "num": 2, "size": 4.0 }] } sB - name: Create a new primary partition parted: device: /dev/sdb number: 1 state: present - name: Remove partition number 1 parted: device: /dev/sdb number: 1 state: absent - name: Create a new primary partition with a size of 1GiB parted: device: /dev/sdb number: 1 state: present part_end: 1GiB - name: Create a new primary partition for LVM parted: device: /dev/sdb number: 2 flags: [ lvm ] state: present part_start: 1GiB # Example on how to read info and reuse it in subsequent task - name: Read device information (always use unit when probing) parted: device=/dev/sdb unit=MiB register: sdb_info - name: Remove all partitions from disk parted: device: /dev/sdb number: '{{ item.num }}' state: absent loop: '{{ sdb_info.partitions }}' (t AnsibleModuleNtBtKBtMBtGBtTBtKiBtMiBtGiBtTiBtst%tcyltchstcompacttcC`sêtjd|ƒ}|d kr¤tjd|ƒ}|d krStjdd|ƒnit|jdƒƒd6t|jdƒƒd6t|jd ƒƒd 6}d }n<|jdƒd k rË|jdƒ}nt|jdƒƒ}||fS( s: Parses a string containing a size of information s^([\d.]+)([\w%]+)?$s^(\d+),(\d+),(\d+)$tmsgs+Error interpreting parted size output: '%s'itcylinderitheaditsectorRN(tretsearchtNonetmodulet fail_jsontinttgrouptfloat(tsize_strtunittmatchestsize((sA/usr/lib/python2.7/site-packages/ansible/modules/system/parted.pyt parse_unitÊs    cC`s«g|jdƒD]}|jƒdkr|^q}|djdƒjdƒ}t|d|ƒ\}}i|dd6|d6|jƒd 6|d d 6|d d 6t|dƒd6t|dƒd6}|d$krb|djdƒjdƒ}t|dƒ\}} it|dƒd6t|dƒd6t|dƒd6|d6| jƒd6|d<|d}ng} x.|dD]"} | jdƒjdƒ} |dkrÒt| dƒd}| d} | d }| d }n$d}| d} | d}| d }| jit| dƒd6t| dƒdd6t| dƒdd6|d6| d6|d6g|jd ƒD]}|dkr_|jƒ^q_d!6|jƒd 6ƒqsWi|d"6| d#6S(%s Parses the output of parted and transforms the data into a dictionary. Parted Machine Parseable Output: See: https://lists.alioth.debian.org/pipermail/parted-devel/2006-December/00 0573.html - All lines end with a semicolon (;) - The first line indicates the units in which the output is expressed. CHS, CYL and BYT stands for CHS, Cylinder and Bytes respectively. - The second line is made of disk information in the following format: "path":"size":"transport-type":"logical-sector-size":"physical-sector-siz e":"partition-table-type":"model-name"; - If the first line was either CYL or CHS, the next line will contain information on no. of cylinders, heads, sectors and cylinder size. - Partition information begins from the next line. This is of the format: (for BYT) "number":"begin":"end":"size":"filesystem-type":"partition-name":"flags-s et"; (for CHS/CYL) "number":"begin":"end":"filesystem-type":"partition-name":"flags-set"; s Rit;t:itdevR'R%ittableitmodelit logical_blockitphysical_blockRRit cylinderstheadstsectorstcyl_sizet cyl_size_unittchs_infotnumtbegintendtfstypetnames, tflagstgenerict partitions(Rschs(tsplittstriptrstripR(tlowerR!tappend(t parted_outputR%txtlinestgeneric_paramsR'R<R5R3tcyl_unittpartstlinet part_paramsR9R:R;tf((sA/usr/lib/python2.7/site-packages/ansible/modules/system/parted.pytparse_partition_infoèsV4              5cC`sM|jƒ}|dkrdS|dkrvtdttj|ƒdd ƒƒ}d}|ttƒkrvt|}qvnd}|tkržd tj|ƒ}n"|tkrÀd tj|ƒ}n||d}|dkrç|d}n#|dkr|d}n |d}|dkrd}n|dkr4d }nd}t ||ƒ|fS(s Formats a size in bytes into a different unit, like parted does. It doesn't manage CYL and CHS formats, though. This function has been adapted from https://github.com/Distrotech/parted/blo b/279d9d869ff472c52b9ec2e180d568f0c99e30b0/libparted/unit.c igtbRRRRgð?g@g@@g@ig¼‰Ø—²ÒœR?RQRRRR!R"( RiRjRkRDRER&tmajortminortrev((sA/usr/lib/python2.7/site-packages/ansible/modules/system/parted.pyRrÂs   4 c C`s€|r|tj r|dt|||f}tj|ƒ\}}}|dkr|tjdd|jƒd|d|d|ƒq|ndS( s Runs a parted script. s%s -s -m -a %s %s -- %siRs%Error while running parted script: %sRiRjRkN(Rt check_modeRmRnR R?(tscriptRbtalignRpRiRjRk((sA/usr/lib/python2.7/site-packages/ansible/modules/system/parted.pytpartedàs  cC`sNy5t|dƒ}z|jƒjƒSWd|jƒXWntk rI|SXdS(s8 Reads the first line of a file and returns it. trN(topentreadlineR?tclosetIOError(t file_pathtdefaultRK((sA/usr/lib/python2.7/site-packages/ansible/modules/system/parted.pyRañs c`st‡‡fd†|DƒƒS(sf Looks if a partition that has a specific value for a specific attribute actually exists. c3`s)|]}|ˆo |ˆˆkVqdS(N((t.0tpart(t attributetnumber(sA/usr/lib/python2.7/site-packages/ansible/modules/system/parted.pys s(tany(R=RˆR‰((RˆR‰sA/usr/lib/python2.7/site-packages/ansible/modules/system/parted.pyt part_existsÿscC`st|ƒ\}}|tkS(s7 Checks if the input string is an allowed size (R(t parted_units(R$R'R%((sA/usr/lib/python2.7/site-packages/ansible/modules/system/parted.pytcheck_size_format sc!C`st}d}d}tdtdtdddtƒdtdddd d d d d d gƒdtddƒdtddddd tƒdtddddd ddddddddddg ƒdtddddd dd dgƒd!tdddd"ƒd#tdddd$ƒd%tddƒd&tdd'ƒd(tdddd)d d*d)d+gƒƒ d,d(d+dggd(d*dgggd-tƒaid.d/6d.d06d.d16d.d26t_tjd}tjd}tjd}tjd}tjd}tjd}tjd!} tjd#} tjd%} tjd(} tjd&} tjd3tƒa |dk rn|d4krntj d5d6ƒnt | ƒs™tj d5d7d8t | ƒƒnt | ƒsÄtj d5d9d8t | ƒƒnt||ƒ}|d:}| d+krO|d;jd<dƒ|kr|d=|7}n|rIt|d>|ƒ rI|d?|| | f7}n|rh|rhd@||f}n|rª||7}t|||ƒt}d}t||ƒd:}nt|d>|ƒsÅtjrigd&6}tjs g|D]}|d>|krâ|^qâdA}n| dk rF|jd%dƒ| krF|dB|| f7}n| rdC| krtdD| krt| jdDƒntt|d&ƒt| ƒƒ}tt| ƒt|d&ƒƒ}x"|D]}|dE||f7}q»Wx%|D]}|dF||f7}qàWqn|r#|r#d@||f}n|r¿||7}t}t|||ƒq¿np| d*kr¦t|d>|ƒsvtjr¿dG|}||7}t}t|||ƒq¿n| d)kr¿dH|}nt||ƒ}tjdI|dJ|d;d:|d:dK|jƒƒdS(LNRt argument_specRbttypetstrtrequiredR}R…toptimaltchoicesRtminimaltnoneR‰R!R%Rtlabeltmsdostaixtamigatbsdtdvhtgpttlooptmactpc98tsunt part_typetprimarytextendedtlogicalt part_starts0%tpart_ends100%R:R;tlisttstatetinfotabsenttpresentt required_iftsupports_check_modetCtLANGtLC_ALLt LC_MESSAGEStLC_CTYPER~iRs,The partition number must be greater then 0.sZThe argument 'part_start' doesn't respect required format.The size unit is case sensitive.RksXThe argument 'part_end' doesn't respect required format.The size unit is case sensitive.R=R<R,s mklabel %s R6smkpart %s %s %s s unit %s %sisname %s '"%s"' tesptboots set %s %s on sset %s %s off srm %s sunit '%s' print tchangedtdiskR|(RsRtdictRtRŒRtrun_command_environ_updatetparamst get_bin_pathRmRR RR(RqtgetR‹R~R{RBR§tsett exit_jsonR?(Rµt output_scriptR|RbR}R‰R%R–R¡R¥R¦R:R¨R;tcurrent_devicet current_partst partitiontpt flags_offtflags_onRKtfinal_device_status((sA/usr/lib/python2.7/site-packages/ansible/modules/system/parted.pytmains¾'9$' %                     0$              t__main__( t __future__RRRRt __metaclass__tANSIBLE_METADATAt DOCUMENTATIONtRETURNtEXAMPLEStansible.module_utils.basicRRORR^RRRTRŒR(RLR[RhRqRlRrR~RRaR‹RRÆt__name__(((sA/usr/lib/python2.7/site-packages/ansible/modules/system/parted.pyts8   [*)     X 4        ¤