Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/network/f5/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyc

�
�Udac@`sCddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZytddlm
Z
dd
lmZddlmZddlmZddlmZddlmZddlmZWn�ek
rYddlm
Z
dd
lmZddlmZddlmZddlmZddlmZddlmZnXdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd ��YZd!efd"��YZ d#efd$��YZ!d%�Z"e#d&kr?e"�nd'S((i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bys�
---
module: bigip_password_policy
short_description: Manages the authentication password policy on a BIG-IP
description:
  - Manages the authentication password policy on a BIG-IP.
version_added: 2.8
options:
  expiration_warning:
    description:
      - Specifies the number of days before a password expires.
      - Based on this value, the BIG-IP system automatically warns users when their
        password is about to expire.
    type: int
  max_duration:
    description:
      - Specifies the maximum number of days a password is valid.
    type: int
  max_login_failures:
    description:
      - Specifies the number of consecutive unsuccessful login attempts
        that the system allows before locking out the user.
      - Specify zero (0) to disable this parameter.
    type: int
  min_duration:
    description:
      - Specifies the minimum number of days a password is valid.
    type: int
  min_length:
    description:
      - Specifies the minimum number of characters in a valid password.
      - This value must be between 6 and 255.
    type: int
  policy_enforcement:
    description:
      - Enables or disables the password policy on the BIG-IP system.
    type: bool
  required_lowercase:
    description:
      - Specifies the number of lowercase alpha characters that must be
        present in a password for the password to be valid.
    type: int
  required_numeric:
    description:
      - Specifies the number of numeric characters that must be present in
        a password for the password to be valid.
    type: int
  required_special:
    description:
      - Specifies the number of special characters that must be present in
        a password for the password to be valid.
    type: int
  required_uppercase:
    description:
      - Specifies the number of uppercase alpha characters that must be
        present in a password for the password to be valid.
    type: int
  password_memory:
    description:
      - Specifies whether the user has configured the BIG-IP system to
        remember a password on a specific computer and how many passwords
        to remember.
    type: int
extends_documentation_fragment: f5
author:
  - Tim Rupp (@caphrim007)
s�
- name: Change password policy to require 2 numeric characters
  bigip_password_policy:
    required_numeric: 2
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost
s�
expiration_warning:
  description: The new expiration warning.
  returned: changed
  type: int
  sample: 7
max_duration:
  description: The new max duration.
  returned: changed
  type: int
  sample: 99999
max_login_failures:
  description: The new max login failures.
  returned: changed
  type: int
  sample: 0
min_duration:
  description: The new min duration.
  returned: changed
  type: int
  sample: 0
min_length:
  description: The new min password length.
  returned: changed
  type: int
  sample: 6
policy_enforcement:
  description: The new policy enforcement setting.
  returned: changed
  type: bool
  sample: yes
required_lowercase:
  description: The lowercase requirement.
  returned: changed
  type: int
  sample: 1
required_numeric:
  description: The numeric requirement.
  returned: changed
  type: int
  sample: 2
required_special:
  description: The special character requirement.
  returned: changed
  type: int
  sample: 1
required_uppercase:
  description: The uppercase character requirement.
  returned: changed
  type: int
  sample: 1
password_memory:
  description: The new number of remembered passwords
  returned: changed
  type: int
  sample: 0
(t
AnsibleModule(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tfq_name(ttransform_name(tf5_argument_spec(tflatten_booleant
ParameterscB`s�eZidd6dd6dd6dd6dd	6d
d6dd
6dd6dd6dd6dd6Zddddd	dd
ddddgZdddddd
dddddgZdddddd
dddddgZed��ZRS(texpiration_warningtexpirationWarningtmax_durationtmaxDurationtmax_login_failurestmaxLoginFailurestmin_durationtminDurationt
min_lengtht
minimumLengthtpassword_memorytpasswordMemorytpolicy_enforcementtpolicyEnforcementtrequired_lowercasetrequiredLowercasetrequired_numerictrequiredNumerictrequired_specialtrequiredSpecialtrequired_uppercasetrequiredUppercasecC`st|jd�S(NR(Rt_values(tself((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyR�s(t__name__t
__module__tapi_maptapi_attributestreturnablest
updatablestpropertyR(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyR�s\
			t
ApiParameterscB`seZRS((R)R*(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyR0�stModuleParameterscB`seZRS((R)R*(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyR1�stChangescB`seZd�ZRS(cC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(R-tgetattrt_filter_paramst	Exception(R(tresultt
returnable((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyt	to_return�s
(R)R*R8(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyR2�st
UsableChangescB`seZed��ZRS(cC`s2|jddkrdS|jddkr.dSdS(NRtyestenabledtdisabled(R'tNone(R(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyR�s
(R)R*R/R(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyR9�stReportableChangescB`seZed��ZRS(cC`st|jd�S(NR(RR'(R(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyR	s(R)R*R/R(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyR>st
DifferencecB`s&eZdd�Zd�Zd�ZRS(cC`s||_||_dS(N(twantthave(R(R@RA((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyt__init__s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(R3tAttributeErrort_Difference__default(R(tparamR6((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pytcompares

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(R3R@RARC(R(REtattr1tattr2((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyt	__defaults
N(R)R*R=RBRFRD(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyR?s	t
ModuleManagercB`sbeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZRS(
cO`s^|jdd�|_t|jj�|_td|jj�|_t�|_	t
�|_dS(Ntmoduletparams(tgetR=RKR	RLtclientR1R@R0RAR9tchanges(R(targstkwargs((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyRB%s
cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NRL(RR-R3R@R=R9RO(R(tchangedtkey((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyt_set_changed_options,scC`s�t|j|j�}tj}t�}xX|D]P}|j|�}|dkrUq.q.t|t�rt|j	|�q.|||<q.W|r�t
d|�|_tSt
S(NRL(R?R@RARR.tdictRFR=t
isinstancetupdateR9ROtTruetFalse(R(tdiffR.RRtktchange((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyt_update_changed_options4s		
cC`sK|jdg�}x2|D]*}|jjjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopRNRKt	deprecate(R(R6twarningstwarning((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyt_announce_deprecationsFs


cC`smt�}|j�}td|jj��}|j�}|j|�|jtd|��|j|�|S(NRLRR(RUtpresentR>ROR8RWRe(R(R6RRt
reportableRO((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pytexec_moduleNs	

cC`s
|j�S(N(RW(R(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyRfZscC`s|j�}|rtStS(N(R]RXRY(R(R6((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyt
should_update]scC`s=|j�|_|j�stS|jjr/tS|j�tS(N(tread_current_from_deviceRARiRYRKt
check_modeRXtupdate_on_device(R(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyRWcs
cC`s�|jj�}dj|jjd|jjd�}|jjj|d|�}y|j�}Wn%tk
r�}t	t
|���nXd|kr�|ddkr�d|kr�t	|d��q�t	|j��ndS(Ns,https://{0}:{1}/mgmt/tm/auth/password-policytservertserver_porttjsontcodei�tmessage(ROt
api_paramstformatRNtprovidertapitpatchRot
ValueErrorR
tstrtcontent(R(RLturitresptresponsetex((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyRlls
cC`s�dj|jjd|jjd�}|jjj|�}y|j�}Wn%tk
rr}tt|���nXd|kr�|ddkr�d|kr�t|d��q�t|j	��nt
d|�S(Ns,https://{0}:{1}/mgmt/tm/auth/password-policyRmRnRpi�RqRL(RsRNRtRuRMRoRwR
RxRyR0(R(RzR{R|R}((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyRj~s
(R)R*RBRTR]ReRhRfRiRWRlRj(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyRJ$s										tArgumentSpeccB`seZd�ZRS(cC`s�t|_tdtdd�dtdd�dtdd�dtdd�dtdd�dtdd�d	tdd
�dtdd�dtdd�d
tdd�dtdd��}i|_|jjt�|jj|�dS(NRttypetintRRRRRRtboolRR!R#R%(RXtsupports_check_modeRUt
argument_specRWR(R(R�((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyRB�s 		(R)R*RB(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyR~�scC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NR�R�RKR_(
R~RR�R�RJRht	exit_jsonR
t	fail_jsonRx(tspecRKtmmtresultsR}((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pytmain�s		t__main__N($t
__future__RRRRt
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRt%library.module_utils.network.f5.bigipR	t&library.module_utils.network.f5.commonR
RRR
RRtImportErrort%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commonRR0R1R2R9R>tobjectR?RJR~R�R)(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_password_policy.pyt<module>sH


D:
>
m	

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