�
�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 d l m
Z
m Z d
� Z d � Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust certifiedt supported_bysg
---
module: ucs_timezone
short_description: Configures timezone on Cisco UCS Manager
description:
- Configures timezone on Cisco UCS Manager.
- Examples can be used with the L(UCS Platform Emulator,https://communities.cisco.com/ucspe).
extends_documentation_fragment: ucs
options:
state:
description:
- If C(absent), will unset timezone.
- If C(present), will set or update timezone.
choices: [absent, present]
default: present
admin_state:
description:
- The admin_state setting
- The enabled admin_state indicates the timezone configuration is utilized by UCS Manager.
- The disabled admin_state indicates the timezone configuration is ignored by UCS Manager.
choices: [disabled, enabled]
default: enabled
description:
description:
- A user-defined description of the timezone.
- Enter up to 256 characters.
- "You can use any characters or spaces except the following:"
- "` (accent mark), \ (backslash), ^ (carat), \" (double quote), = (equal sign), > (greater than), < (less than), or ' (single quote)."
aliases: [ descr ]
default: ""
timezone:
description:
- The timezone name.
- Time zone names are from the L(tz database,https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
- The timezone name is case sensitive.
- The timezone name can be between 0 and 510 alphanumeric characters.
- You cannot use spaces or any special characters other than
- "\"-\" (hyphen), \"_\" (underscore), \"/\" (backslash)."
requirements:
- ucsmsdk
author:
- John McDonough (@movinalot)
- CiscoUcs (@CiscoUcs)
version_added: '2.7'
s�
- name: Configure Time Zone
ucs_timezone:
hostname: 172.16.143.150
username: admin
password: password
state: present
admin_state: enabled
timezone: America/Los_Angeles
description: 'Time Zone for Los Angeles'
- name: Unconfigure Time Zone
ucs_timezone:
hostname: 172.16.143.150
username: admin
password: password
state: absent
admin_state: disabled
s
#
( t
AnsibleModule( t UCSModulet ucs_argument_specc C` s� t } | j d t d d � d t d d d d g d d � d t d d d d
d d d
g � d
t d d d d d d d g � � t | d t d d
d d g g g �} t | � } t } t } ydt } t } d } | j j | � } | r� t } n | j d
d k rZ| r!| j
sNd | _ d | _ | j j
| d t �| j j � n t } q!n� | r�t d | j d � } | j d | d <| j d | d <| j | � r�t } q�n | s!| j
s| j d | _ | j d | _ | j d | _ | j j
| d t �| j j � n t } n Wn0 t k
rT}
t } d t |
� | j d <n X| | j d <| r{| j | j � n | j | j � d S( Nt timezonet typet strt descriptiont aliasest descrt defaultt t admin_statet enabledt choicest disabledt statet presentt absentt supports_check_modet required_ifs sys/svc-ext/datetime-svct modify_presents setup error: %s t msgt changed( R
t updatet dictR t TrueR t Falset login_handlet query_dnt paramst
check_modeR R t add_mot committ check_prop_matchR t ExceptionR
t resultt fail_jsont exit_json( t
argument_spect modulet ucst errR t mo_existst props_matcht dnt mot kwargst e( ( sV /usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_timezone.pyt
run_module[ sb !"
c C` s t � d S( N( R8 ( ( ( sV /usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_timezone.pyt main� s t __main__N( t
__future__R R R R t
__metaclass__t ANSIBLE_METADATAt
DOCUMENTATIONt EXAMPLESt RETURNt ansible.module_utils.basicR t* ansible.module_utils.remote_management.ucsR R
R8 R9 t __name__( ( ( sV /usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_timezone.pyt <module> s
2 E
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]