�
�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
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: dladm_etherstub
short_description: Manage etherstubs on Solaris/illumos systems.
description:
- Create or delete etherstubs on Solaris/illumos systems.
version_added: "2.2"
author: Adam Števko (@xen0l)
options:
name:
description:
- Etherstub name.
required: true
temporary:
description:
- Specifies that the etherstub is temporary. Temporary etherstubs
do not persist across reboots.
required: false
default: false
type: bool
state:
description:
- Create or delete Solaris/illumos etherstub.
required: false
default: "present"
choices: [ "present", "absent" ]
s�
# Create 'stub0' etherstub
- dladm_etherstub:
name: stub0
state: present
# Remove 'stub0 etherstub
- dladm_etherstub:
name: stub0
state: absent
s0
name:
description: etherstub name
returned: always
type: str
sample: "switch0"
state:
description: state of the target
returned: always
type: str
sample: "present"
temporary:
description: etherstub's persistence
returned: always
type: bool
sample: "True"
( t
AnsibleModulet Etherstubc B` s, e Z d � Z d � Z d � Z d � Z RS( c C` s= | | _ | j d | _ | j d | _ | j d | _ d S( Nt namet temporaryt state( t modulet paramsR
R R ( t selfR
( ( sS /usr/lib/python2.7/site-packages/ansible/modules/network/illumos/dladm_etherstub.pyt __init__N s c C` sh | j j d t � g } | j d � | j | j � | j j | � \ } } } | d k r` t St Sd S( Nt dladms show-etherstubi ( R
t get_bin_patht Truet appendR
t run_commandt False( R t cmdt rct _( ( sS /usr/lib/python2.7/site-packages/ansible/modules/network/illumos/dladm_etherstub.pyt etherstub_existsU s
c C` s^ | j j d t � g } | j d � | j r>