Anons79 Mini Shell

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

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddlm
Z
mZmZd
�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
---
module: mso_user
short_description: Manage users
description:
- Manage users on Cisco ACI Multi-Site.
author:
- Dag Wieers (@dagwieers)
version_added: '2.8'
options:
  user:
    description:
    - The name of the user.
    type: str
    required: yes
    aliases: [ name ]
  user_password:
    description:
    - The password of the user.
    type: str
  first_name:
    description:
    - The first name of the user.
    - This parameter is required when creating new users.
    type: str
  last_name:
    description:
    - The last name of the user.
    - This parameter is required when creating new users.
    type: str
  email:
    description:
    - The email address of the user.
    - This parameter is required when creating new users.
    type: str
  phone:
    description:
    - The phone number of the user.
    - This parameter is required when creating new users.
    type: str
  account_status:
    description:
    - The status of the user account.
    type: str
    choices: [ active ]
  domain:
    description:
    - The domain this user belongs to.
    - When creating new users, this defaults to C(Local).
    type: str
  roles:
    description:
    - The roles for this user.
    type: list
  state:
    description:
    - Use C(present) or C(absent) for adding or removing.
    - Use C(query) for listing an object or multiple objects.
    type: str
    choices: [ absent, present, query ]
    default: present
notes:
- A default installation of ACI Multi-Site ships with admin password 'we1come!' which requires a password change on first login.
  See the examples of how to change the 'admin' password using Ansible.
extends_documentation_fragment: mso
s
- name: Update initial admin password
  mso_user:
    host: mso_host
    username: admin
    password: we1come!
    user_name: admin
    user_password: SomeSecretPassword
    state: present
  delegate_to: localhost

- name: Add a new user
  mso_user:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    user_name: dag
    description: Test user
    first_name: Dag
    last_name: Wieers
    email: [email protected]
    phone: +32 478 436 299
    state: present
  delegate_to: localhost

- name: Remove a user
  mso_user:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    user_name: dag
    state: absent
  delegate_to: localhost

- name: Query a user
  mso_user:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    user_name: dag
    state: query
  delegate_to: localhost
  register: query_result

- name: Query all users
  mso_user:
    host: mso_host
    username: admin
    password: SomeSecretPassword
    state: query
  delegate_to: localhost
  register: query_result
s # (t
AnsibleModule(t	MSOModuletmso_argument_spectissubsetcC`s�t�}|jdtddddg�dtdddt�dtdd�d	tdd�d
tdd�dtdd�dtddd
dg�dtdd�dtdd�dtddddd
dddg��
td|dtddddggdddggg�}|jd}|jd}|jd}|jd	}|jd
}|jd}|jd}|jd}	t|�}
|
j|jd�}|
j|jd�}d}
d}|r|
j
|d|�|
_|
jr|
jd}
djd|
�}qn|
j
|�|
_|	dkr(n�|	dkr||
j|
_|
jr�|jr^i|
_qy|
j|dd�|
_q�n`|	dkr�|
j|
_td|
d|d |d!|d"|d#|d$|d%|d&|d|�
}|
j|d't�|
jjd%�dkrd|
jd%<n|
jr�t|
j|
j�s�d |
jkra|
jjd(�t|
jd)<n|jry|
j|
_q�|
j|dd*d+|
j�|
_q�q�|jr�|
j|
_q�|
j|dd,d+|
j�|
_n|
j�dS(-Ntuserttypetstrtaliasestnamet
user_passwordtno_logt
first_namet	last_nametemailtphonetaccount_statustchoicestactivetdomaintrolestlisttstatetdefaulttpresenttabsenttqueryt
argument_spectsupports_check_modetrequired_iftuserstusernametids
users/{id}tmethodtDELETEtpasswordt	firstNametlastNametemailAddresstphoneNumbert
accountStatustdomainIdtcollates[A password change is assumed, as the MSO REST API does not return passwords we do not know.tchangedtPUTtdatatPOST(R
tupdatetdicttTrueRtparamsR	tlookup_rolest
lookup_domaintNonetget_objtexistingtformatt
query_objstprevioust
check_modetrequesttsanitizetsenttgetRtproposedtmoduletwarntresultt	exit_json(R"RHt	user_nameRRRRRRRtmsoRRtuser_idtpathtpayload((sH/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_user.pytmain�s�		%







	
					'	$t__main__N(t
__future__RRRR
t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRt$ansible.module_utils.network.aci.msoR	R
RRQt__name__(((sH/usr/lib/python2.7/site-packages/ansible/modules/network/aci/mso_user.pyt<module>s


C6	j

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