Anons79 Mini Shell

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

�
�Udac@s�idd6dgd6dd6ZdZdZdZd	d
lZd	dlmZmZmZd	dlm	Z	m
Z
d	d
lmZd�Z
d�Zedkr�e�nd
S(s1.1tmetadata_versiontpreviewtstatustnetworktsupported_bys�
---

module: nxos_ntp_options
extends_documentation_fragment: nxos
version_added: "2.2"
short_description: Manages NTP options.
description:
    - Manages NTP options, e.g. authoritative server and logging.
author:
    - Jason Edelman (@jedelman8)
notes:
    - Tested against NXOSv 7.3.(0)D1(1) on VIRL
    - When C(state=absent), master and logging will be set to False and
      stratum will be removed as well
options:
    master:
        description:
            - Sets whether the device is an authoritative NTP server.
        type: bool
    stratum:
        description:
            - If C(master=true), an optional stratum can be supplied (1-15).
              The device default is 8.
    logging:
        description:
            - Sets whether NTP logging is enabled on the device.
        type: bool
    state:
        description:
            - Manage the state of the resource.
        default: present
        choices: ['present','absent']
s�
# Basic NTP options configuration
- nxos_ntp_options:
    master: true
    stratum: 12
    logging: false
    host: "{{ inventory_hostname }}"
    username: "{{ un }}"
    password: "{{ pwd }}"
s�
updates:
    description: command sent to the device
    returned: always
    type: list
    sample: ["no ntp logging", "ntp master 12"]
i����N(t
get_configtload_configtrun_commands(tnxos_argument_spect
check_args(t
AnsibleModulecCs�d}t}t}d}t|i|d6dd6�d}|r�tjd|tj�}|rut}|jd�}nd|j�k}ni|d	6|d
6|d6S(Nsshow running-config | inc ntptcommandttexttoutputis^ntp master(?: (\d+))isntp loggingtmastertstratumtlogging(	tFalsetNoneRtretsearchtMtTruetgrouptlower(tmoduletcmdRRRR
tmatch((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_ntp_options.pytget_currentSs!c

Cs�tdtdtdd�dtdtdd�dtdtdd�dtd	d
dgdd��}|jt�td
|dt�}t�}t||�|jd}|jd}|jd}|jd}|r|tkr|dkr|j	dd�qnt
|�}itd6}t�}	|d
krh|drK|	jd�n|dr/|	jd�q/n�|dkr/|r�|dr�|	jd�n&|tkr�|dr�|	jd�n|r�||dkr�|	jd|�n|r|dr|	jd�q/|tkr/|dr/|	jd�q/n|	|d<|	|d<|	ro|jsbt
||	�nt|d<n||d<|j|�dS(NRtrequiredttypetboolRtstrRtstatetchoicestabsenttpresenttdefaultt
argument_spectsupports_check_modeitmsgs+master MUST be True when stratum is changedtchangeds
no ntp mastersno ntp loggings
ntp masters
ntp master %ssntp loggingtcommandstupdatestwarnings(tdictRtupdateRR
RtlistR	tparamst	fail_jsonRtappendt
check_modeRt	exit_json(
R&RR,RRRR!tcurrenttresultR*((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_ntp_options.pytmainfsX
		





	



	

t__main__(tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNRt&ansible.module_utils.network.nxos.nxosRRRRR	tansible.module_utils.basicR
RR7t__name__(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_ntp_options.pyt<module>s


$
		?

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