Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/web_infrastructure/ansible_tower/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/web_infrastructure/ansible_tower/tower_user.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zdd
l	m
Z
mZmZy/ddl
Z
ddljZddlmZWnek
r�nXd
�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bysW
---
module: tower_user
author: "Wayne Witzel III (@wwitzel3)"
version_added: "2.3"
short_description: create, update, or destroy Ansible Tower user.
description:
    - Create, update, or destroy Ansible Tower users. See
      U(https://www.ansible.com/tower) for an overview.
options:
    username:
      description:
        - The username of the user.
      required: True
    first_name:
      description:
        - First name of the user.
    last_name:
      description:
        - Last name of the user.
    email:
      description:
        - Email address of the user.
      required: True
    password:
      description:
        - Password of the user.
    superuser:
      description:
        - User is a system wide administrator.
      type: bool
      default: 'no'
    auditor:
      description:
        - User is a system wide auditor.
      type: bool
      default: 'no'
    state:
      description:
        - Desired state of the resource.
      default: "present"
      choices: ["present", "absent"]

requirements:
  - ansible-tower-cli >= 3.2.0

extends_documentation_fragment: tower
s
- name: Add tower user
  tower_user:
    username: jdoe
    password: foobarbaz
    email: [email protected]
    first_name: John
    last_name: Doe
    state: present
    tower_config_file: "~/tower_cli.cfg"

- name: Add tower user as a system administrator
  tower_user:
    username: jdoe
    password: foobarbaz
    email: [email protected]
    superuser: yes
    state: present
    tower_config_file: "~/tower_cli.cfg"

- name: Add tower user as a system auditor
  tower_user:
    username: jdoe
    password: foobarbaz
    email: [email protected]
    auditor: yes
    state: present
    tower_config_file: "~/tower_cli.cfg"

- name: Delete tower user
  tower_user:
    username: jdoe
    email: [email protected]
    state: absent
    tower_config_file: "~/tower_cli.cfg"
(tTowerModulettower_auth_configttower_check_modeN(tsettingscC`setdtdt�dt�dt�dtdt�dtdt�dtd	d
dt�dtd	d
dt�d
tdddgdd��}td|dt�}|jjd�}|jjd�}|jjd�}|jjd�}|jjd�}|jjd�}|jjd�}|jjd
�}	i|d6|	d
6}
t|�}tj|���t	|�t
jd�}y~|	dkr�|jd|d|d|d|d|d|d|dt�}
|
d|
d<n!|	dkr�|j
d|�}
nWnDtjtjtjfk
r?}|jddj|�dt�nXWdQX|
d|
d<|j|
�dS(Ntusernametrequiredt
first_namet	last_nametpasswordtno_logtemailt	superuserttypetbooltdefaulttauditortstatetchoicestpresenttabsentt
argument_spectsupports_check_modetusertis_superusertis_system_auditortcreate_on_missingtidtmsgsFailed to update the user: {0}tchanged(tdicttTruetFalseRtparamstgetR	Rtruntime_valuesR
t	tower_clitget_resourcetmodifytdeletetexctConnectionErrort
BadRequestt	AuthErrort	fail_jsontformatt	exit_json(RtmoduleRRRRRRRRtjson_outputt
tower_authRtresulttexcinfo((s_/usr/lib/python2.7/site-packages/ansible/modules/web_infrastructure/ansible_tower/tower_user.pytmainrsF		
!)t__main__(t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLESt"ansible.module_utils.ansible_towerRR	R
R+ttower_cli.exceptionst
exceptionsR/ttower_cli.confRtImportErrorR;t__name__(((s_/usr/lib/python2.7/site-packages/ansible/modules/web_infrastructure/ansible_tower/tower_user.pyt<module>s 


2&
	,

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