??????????????
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
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: zfs
short_description: Manage zfs
description:
- Manages ZFS file systems, volumes, clones and snapshots
version_added: "1.1"
options:
name:
description:
- File system, snapshot or volume name e.g. C(rpool/myfs).
required: true
state:
description:
- Whether to create (C(present)), or remove (C(absent)) a
file system, snapshot or volume. All parents/children
will be created/destroyed as needed to reach the desired state.
choices: [ absent, present ]
required: true
origin:
description:
- Snapshot from which to create a clone.
extra_zfs_properties:
description:
- A dictionary of zfs properties to be set.
- See the zfs(8) man page for more information.
version_added: "2.5"
author:
- Johan Wiren (@johanwiren)
s@
- name: Create a new file system called myfs in pool rpool with the setuid property turned off
zfs:
name: rpool/myfs
state: present
extra_zfs_properties:
setuid: off
- name: Create a new volume called myvol in pool rpool.
zfs:
name: rpool/myvol
state: present
extra_zfs_properties:
volsize: 10M
- name: Create a snapshot of rpool/myfs file system.
zfs:
name: rpool/myfs@mysnapshot
state: present
- name: Create a new file system called myfs2 with snapdir enabled
zfs:
name: rpool/myfs2
state: present
extra_zfs_properties:
snapdir: enabled
- name: Create a new file system by cloning a snapshot
zfs:
name: rpool/cloned_fs
state: present
origin: rpool/myfs@mysnapshot
- name: Destroy a filesystem
zfs:
name: rpool/myfs
state: absent
N( t
AnsibleModulet Zfsc B` sY e Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
RS( c C` s¬ | | _ | | _ | | _ t | _ | j d t ƒ | _ | j d t ƒ | _ | j d ƒ d j d ƒ d | _
t j ƒ d d k | _
| j ƒ | _ | j ƒ | _ d S( Nt zfst zpoolt /i t @t SunOS( t modulet namet
propertiest Falset changedt get_bin_patht Truet zfs_cmdt zpool_cmdt splitt poolt ost unamet
is_solarist
check_openzfst
is_openzfst check_enhanced_sharingt enhanced_sharing( t selfR R R ( ( sC /usr/lib/python2.7/site-packages/ansible/modules/storage/zfs/zfs.pyt __init__\ s #c C` s” | j g } | j d d g ƒ | j | j ƒ | j j | d t ƒ\ } } } | j ƒ d j ƒ d } | d k rz t St | ƒ d k r t St
S( Nt gett versiont check_rciÿÿÿÿi t -iˆ ( R t extendt appendR R t run_commandR t
splitlinesR t intR ( R! t cmdt rct outt errR$ ( ( sC /usr/lib/python2.7/site-packages/ansible/modules/storage/zfs/zfs.pyR h s !c C` sš | j r– | j r– | j g } | j d d g ƒ | j | j ƒ | j j | d t ƒ\ } } } | j ƒ d j
ƒ d } t | ƒ d k r– t Sn t S( NR# R$ R% iÿÿÿÿi i" (
R R R R' R( R R R) R R* R R+ R ( R! R, R- R. R/ R$ ( ( sC /usr/lib/python2.7/site-packages/ansible/modules/storage/zfs/zfs.pyR t s !c C` sW | j d d d | j g } | j j d j | ƒ ƒ \ } } } | d k rO t St Sd S( Nt lists -tt allt i ( R R R R) t joinR R ( R! R, R- R. R/ ( ( sC /usr/lib/python2.7/site-packages/ansible/modules/storage/zfs/zfs.pyt exists s
$c
C` sŸ | j j r t | _ d S| j } | j j j d d ƒ } | j g } d | j k r^ d } n | rm d } n d } | j
| ƒ | d k rœ | d g 7} n | rxu | j ƒ D]d \ } } | d k rÚ | d | g 7} q¯ | d k rù | d
| g 7} q¯ | d d | | f g 7} q¯ Wn | r<| d k r<| j
| ƒ n | j
| j ƒ | j j d
j
| ƒ ƒ \ } } } | d k rˆt | _ n | j j d | ƒ d S( Nt originR
t snapshott clonet creates -pt volsizes -Vt volblocksizes -bs -os %s="%s"R2 i t msg( s createR7 ( R t
check_modeR R R t paramsR# t NoneR R R( t itemsR) R3 t fail_json(
R! R R5 R, t actiont propt valueR- R. R/ ( ( sC /usr/lib/python2.7/site-packages/ansible/modules/storage/zfs/zfs.pyR8 ‡ s8
!$c C` s„ | j j r t | _ d S| j d d | j g } | j j d j | ƒ ƒ \ } } } | d k rm t | _ n | j j d | ƒ d S( Nt destroys -RR2 i R; ( R R<