Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/network/junos/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/network/junos/junos_system.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlmZdd
l
mZmZddl
mZmZmZddl
mZmZmZeZd�Zd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatustnetworktsupported_bys�
---
module: junos_system
version_added: "2.4"
author: "Ganesh Nalawade (@ganeshrn)"
short_description: Manage the system attributes on Juniper JUNOS devices
description:
  - This module provides declarative management of node system attributes
    on Juniper JUNOS devices.  It provides an option to configure host system
    parameters or remove those parameters from the device active
    configuration.
options:
  hostname:
    description:
      - Configure the device hostname parameter. This option takes an ASCII string value.
  domain_name:
    description:
      - Configure the IP domain name
        on the remote device to the provided value. Value
        should be in the dotted name form and will be
        appended to the C(hostname) to create a fully-qualified
        domain name.
  domain_search:
    description:
      - Provides the list of domain suffixes to
        append to the hostname for the purpose of doing name resolution.
        This argument accepts a list of names and will be reconciled
        with the current active configuration on the running node.
  name_servers:
    description:
      - List of DNS name servers by IP address to use to perform name resolution
        lookups.  This argument accepts either a list of DNS servers See
        examples.
  state:
    description:
      - State of the configuration
        values in the device's current active configuration.  When set
        to I(present), the values should be configured in the device active
        configuration and when set to I(absent) the values should not be
        in the device active configuration
    default: present
    choices: ['present', 'absent']
  active:
    description:
      - Specifies whether or not the configuration is active or deactivated
    default: True
    type: bool
requirements:
  - ncclient (>=v0.5.2)
notes:
  - This module requires the netconf system service be enabled on
    the remote device being managed.
  - Tested against vSRX JUNOS version 15.1X49-D15.4, vqfx-10000 JUNOS Version 15.1X53-D60.4.
  - Recommended connection is C(netconf). See L(the Junos OS Platform Options,../network/user_guide/platform_junos.html).
  - This module also works with C(local) connections for legacy playbooks.
extends_documentation_fragment: junos
sd
- name: configure hostname and domain name
  junos_system:
    hostname: junos01
    domain_name: test.example.com
    domain-search:
      - ansible.com
      - redhat.com
      - juniper.com

- name: remove configuration
  junos_system:
    state: absent

- name: configure name servers
  junos_system:
    name_servers:
      - 8.8.8.8
      - 8.8.4.4
s�
diff.prepared:
  description: Configuration difference before and after applying change.
  returned: when configuration is changed and diff option is enabled.
  type: str
  sample: >
          [edit system]
          +  host-name test;
          +  domain-name ansible.com;
          +  domain-search redhat.com;
          [edit system name-server]
              172.26.1.1 { ... }
          +   8.8.8.8;
N(t
AnsibleModule(tjunos_argument_specttostring(tload_configtmap_params_to_objtmap_obj_to_ele(tcommit_configurationtdiscard_changest
locked_configcC`sSxL|D]D}t�jd|�}t|�r||jj|�|�qqWdS(Nsvalidate_%s(tglobalstgettcallabletparams(tmoduletobjtkeyt	validator((sN/usr/lib/python2.7/site-packages/ansible/modules/network/junos/junos_system.pytvalidate_param_valuesws
cC`sWtdt�dt�dtdd�dtdd�dtdd	d
gdd	�dtdtdd
��}|jt�ddddg}dd	|tfdd
|tfdd|tfdd|tfg}td|d|dt�}t�}itd6}|r||d<nd}tj�}|jdidd6td6fdidd6td6fdidd6td6td6fdidd6td6fg�t	||�t
||�}t|||�}	t|��zt
|t|	�|dd�}
|j}|
r@|rt|�n
t|�t|d<|jr@i|
d6|d <q@nWd!QX|j|�d!S("s+ main entry point for module execution
    thostnametdomain_namet
domain_searchttypetlisttname_serverststatetchoicestpresenttabsenttdefaulttactivetbooltsuspendt
argument_spectrequired_iftsupports_check_modetchangedtwarningstsystems	host-nametxpatht	leaf_onlysdomain-names
domain-searcht	value_reqsname-server/nametis_keytactiontmergetpreparedtdiffN(tdicttTruetupdateR	RRtFalsetcollectionstOrderedDictRRR
RRR
t
check_modeRRt_difft	exit_json(R(RR)RR,tresultttoptparam_to_xpath_maptwantteleR5tcommit((sN/usr/lib/python2.7/site-packages/ansible/modules/network/junos/junos_system.pytmainsR		
		







	t__main__(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNR:tansible.module_utils.basicRt(ansible.module_utils.network.junos.junosR	R
RRR
RRRR7tUSE_PERSISTENT_CONNECTIONRREt__name__(((sN/usr/lib/python2.7/site-packages/ansible/modules/network/junos/junos_system.pyt<module>s"


;		>

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]