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_device_httpd.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlmZdd
l
mZyDddlmZddlmZddlmZddlmZWnQek
rddlmZddlmZddlmZddlmZnXdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZdefd��YZd efd!��YZ d"efd#��YZ!d$�Z"e#d%kr�e"�ndS(&i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontstableinterfacetstatust	certifiedtsupported_bysR
---
module: bigip_device_httpd
short_description: Manage HTTPD related settings on BIG-IP
description:
  - Manages HTTPD related settings on the BIG-IP. These settings are interesting
    to change when you want to set GUI timeouts and other TMUI related settings.
version_added: 2.5
options:
  allow:
    description:
      - Specifies, if you have enabled HTTPD access, the IP address or address
        range for other systems that can communicate with this system.
      - To specify all addresses, use the value C(all).
      - IP address can be specified, such as 172.27.1.10.
      - IP ranges can be specified, such as 172.27.*.* or 172.27.0.0/255.255.0.0.
    type: list
  auth_name:
    description:
      - Sets the BIG-IP authentication realm name.
    type: str
  auth_pam_idle_timeout:
    description:
      - Sets the GUI timeout for automatic logout, in seconds.
    type: int
  auth_pam_validate_ip:
    description:
      - Sets the authPamValidateIp setting.
    type: bool
  auth_pam_dashboard_timeout:
    description:
      - Sets whether or not the BIG-IP dashboard will timeout.
    type: bool
  fast_cgi_timeout:
    description:
      - Sets the timeout of FastCGI.
    type: int
  hostname_lookup:
    description:
      - Sets whether or not to display the hostname, if possible.
    type: bool
  log_level:
    description:
      - Sets the minimum httpd log level.
    type: str
    choices:
      - alert
      - crit
      - debug
      - emerg
      - error
      - info
      - notice
      - warn
  max_clients:
    description:
      - Sets the maximum number of clients that can connect to the GUI at once.
    type: int
  redirect_http_to_https:
    description:
      - Whether or not to redirect http requests to the GUI to https.
    type: bool
  ssl_port:
    description:
      - The HTTPS port to listen on.
    type: int
  ssl_cipher_suite:
    description:
      - Specifies the ciphers that the system uses.
      - The values in the suite are separated by colons (:).
      - Can be specified in either a string or list form. The list form is the
        recommended way to provide the cipher suite. See examples for usage.
      - Use the value C(default) to set the cipher suite to the system default.
        This value is equivalent to specifying a list of C(ECDHE-RSA-AES128-GCM-SHA256,
        ECDHE-RSA-AES256-GCM-SHA384,ECDHE-RSA-AES128-SHA,ECDHE-RSA-AES256-SHA,
        ECDHE-RSA-AES128-SHA256,ECDHE-RSA-AES256-SHA384,ECDHE-ECDSA-AES128-GCM-SHA256,
        ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-ECDSA-AES128-SHA,ECDHE-ECDSA-AES256-SHA,
        ECDHE-ECDSA-AES128-SHA256,ECDHE-ECDSA-AES256-SHA384,AES128-GCM-SHA256,
        AES256-GCM-SHA384,AES128-SHA,AES256-SHA,AES128-SHA256,AES256-SHA256,
        ECDHE-RSA-DES-CBC3-SHA,ECDHE-ECDSA-DES-CBC3-SHA,DES-CBC3-SHA).
    type: raw
    version_added: 2.6
  ssl_protocols:
    description:
      - The list of SSL protocols to accept on the management console.
      - A space-separated list of tokens in the format accepted by the Apache
        mod_ssl SSLProtocol directive.
      - Can be specified in either a string or list form. The list form is the
        recommended way to provide the cipher suite. See examples for usage.
      - Use the value C(default) to set the SSL protocols to the system default.
        This value is equivalent to specifying a list of C(all,-SSLv2,-SSLv3).
    type: raw
    version_added: 2.6
notes:
  - Requires the requests Python package on the host. This is as easy as
    C(pip install requests).
requirements:
  - requests
extends_documentation_fragment: f5
author:
  - Joe Reifel (@JoeReifel)
  - Tim Rupp (@caphrim007)
ss
- name: Set the BIG-IP authentication realm name
  bigip_device_httpd:
    auth_name: BIG-IP
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Set the auth pam timeout to 3600 seconds
  bigip_device_httpd:
    auth_pam_idle_timeout: 1200
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Set the validate IP settings
  bigip_device_httpd:
    auth_pam_validate_ip: on
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Set SSL cipher suite by list
  bigip_device_httpd:
    ssl_cipher_suite:
      - ECDHE-RSA-AES128-GCM-SHA256
      - ECDHE-RSA-AES256-GCM-SHA384
      - ECDHE-RSA-AES128-SHA
      - AES256-SHA256
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Set SSL cipher suite by string
  bigip_device_httpd:
    ssl_cipher_suite: ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA:AES256-SHA256
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Set SSL protocols by list
  bigip_device_httpd:
    ssl_protocols:
      - all
      - -SSLv2
      - -SSLv3
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Set SSL protocols by string
  bigip_device_httpd:
    ssl_protocols: all -SSLv2 -SSLv3
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost
s�
auth_pam_idle_timeout:
  description: The new number of seconds for GUI timeout.
  returned: changed
  type: str
  sample: 1200
auth_name:
  description: The new authentication realm name.
  returned: changed
  type: str
  sample: 'foo'
auth_pam_validate_ip:
  description: The new authPamValidateIp setting.
  returned: changed
  type: bool
  sample: on
auth_pam_dashboard_timeout:
  description: Whether or not the BIG-IP dashboard will timeout.
  returned: changed
  type: bool
  sample: off
fast_cgi_timeout:
  description: The new timeout of FastCGI.
  returned: changed
  type: int
  sample: 500
hostname_lookup:
  description: Whether or not to display the hostname, if possible.
  returned: changed
  type: bool
  sample: on
log_level:
  description: The new minimum httpd log level.
  returned: changed
  type: str
  sample: crit
max_clients:
  description: The new maximum number of clients that can connect to the GUI at once.
  returned: changed
  type: int
  sample: 20
redirect_http_to_https:
  description: Whether or not to redirect http requests to the GUI to https.
  returned: changed
  type: bool
  sample: on
ssl_port:
  description: The new HTTPS port to listen on.
  returned: changed
  type: int
  sample: 10443
ssl_cipher_suite:
  description: The new ciphers that the system uses.
  returned: changed
  type: str
  sample: ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA
ssl_cipher_suite_list:
  description: List of the new ciphers that the system uses.
  returned: changed
  type: str
  sample: ['ECDHE-RSA-AES256-GCM-SHA384', 'ECDHE-RSA-AES128-SHA']
ssl_protocols:
  description: The new list of SSL protocols to accept on the management console.
  returned: changed
  type: str
  sample: all -SSLv2 -SSLv3
N(t
AnsibleModule(tstring_types(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tf5_argument_spect
ParameterscB`s4eZidd6dd6dd6dd6dd	6d
d6dd
6dd6dd6dd6dd6dd6Zddddd	dd
ddddddg
Zdddddd
ddddddddgZdddddd
dddddddg
ZdZdZed��Z	ed��Z
ed��Zed��ZRS( tauth_pam_idle_timeouttauthPamIdleTimeouttauth_pam_validate_iptauthPamValidateIpt	auth_nametauthNametauth_pam_dashboard_timeouttauthPamDashboardTimeouttfast_cgi_timeouttfastcgiTimeoutthostname_lookupthostnameLookupt	log_leveltlogLeveltmax_clientst
maxClientstredirect_http_to_httpstredirectHttpToHttpstssl_porttsslPorttssl_cipher_suitetsslCiphersuitet
ssl_protocolstsslProtocoltallowtssl_cipher_suite_lists�ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA:AES256-SHA:AES128-SHA256:AES256-SHA256:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:DES-CBC3-SHAsall -SSLv2 -SSLv3cC`s(|jddkrdSt|jd�S(NR(t_valuestNonetint(tself((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyRPscC`s(|jddkrdSt|jd�S(NR(R)R*R+(R,((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyRVscC`s(|jddkrdSt|jd�S(NR(R)R*R+(R,((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyR\scC`s(|jddkrdSt|jd�S(NR!(R)R*R+(R,((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyR!bs(
t__name__t
__module__tapi_maptapi_attributestreturnablest
updatablest_cipherst
_protocolstpropertyRRRR!(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyRs<
				tModuleParameterscB`sqeZed��Zed��Zed��Zed��Zed��Zed��Zed��Z	RS(cC`s,|jddkrdS|jdr(dSdS(NRtontoff(R)R*(R,((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyRjs

cC`s,|jddkrdS|jdr(dSdS(NRR7R8(R)R*(R,((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyRrs

cC`s,|jddkrdS|jdr(dSdS(NRR7R8(R)R*(R,((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyRzs

cC`s,|jddkrdS|jdr(dSdS(NRtenabledtdisabled(R)R*(R,((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyR�s

cC`s�|jddkrdS|jdddkr2dS|jdddkrMdS|jd}ttg|D]}t|�^qg��}t|�}|S(NR'itallt(R)R*tlisttsettstrtsorted(R,R'txtresult((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyR'�s
+cC`s�|jddkrdSt|jdt�rC|jdj�}n
|jd}|setd��n|dkr�djtjj	d��}n@t|jdt�r�dj|j	d��}ndj|�}|S(NR#s)ssl_cipher_suite may not be set to 'none'tdefaultt:(
R)R*t
isinstanceR	tstripRtjoinRR3tsplit(R,tciphers((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyR#�s
cC`s�|jddkrdSt|jdt�rC|jdj�}n
|jd}|setd��n|dkr�djtjj	d��}n9t|t�r�dj|j	d��}ndj|�}|S(NR%s&ssl_protocols may not be set to 'none'RCt (
R)R*RER	RFRRGRR4RH(R,t	protocols((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyR%�s
(
R-R.R5RRRRR'R#R%(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyR6is
t
ApiParameterscB`seZed��ZRS(cC`sz|jddkrdS|jdddkr2dS|jd}ttg|D]}t|�^qL��}t|�}|S(NR'R<itAllR;(R)R*R=R>R?R@(R,R'RARB((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyR'�s
+(R-R.R5R'(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyRL�stChangescB`seZd�ZRS(cC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(R1tgetattrt_filter_paramst	Exception(R,RBt
returnable((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyt	to_return�s
(R-R.RS(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyRN�st
UsableChangescB`seZRS((R-R.(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyRT�stReportableChangescB`s5eZed��Zed��Zed��ZRS(cC`sAdjtjjd��}|jd|kr2dS|jdSdS(NRDR#RC(RGRR3RHR)(R,RC((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyR#�scC`s|jdjd�S(NR#RD(R)RH(R,((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyR(�scC`sAdjtjjd��}|jd|kr2dS|jdSdS(NRJR%RC(RGRR4RHR)(R,RC((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyR%�s(R-R.R5R#R(R%(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyRU�st
DifferencecB`s5eZdd�Zd�Zd�Zed��ZRS(cC`s||_||_dS(N(twantthave(R,RWRX((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyt__init__�s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(ROtAttributeErrort_Difference__default(R,tparamRB((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pytcompare�s

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(RORWRXRZ(R,R\tattr1tattr2((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyt	__default�s
cC`s�|jjdkrdS|jjdkr>|jjdkr>dS|jjdkrWdgS|jjdkr|jjdkrdS|jjdkr�gS|jj|jjkr�|jjSdS(NR;RMR<(RWR'R*RX(R,((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyR's$$N(R-R.R*RYR]R[R5R'(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyRV�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*RbR
RctclientR6RWRLRXRTtchanges(R,targstkwargs((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyRYs
cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NRc(RR1RORWR*RNRf(R,tchangedtkey((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.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(NRc(RVRWRXRR2tdictR]R*REtupdateRTRftTruetFalse(R,tdiffR2Ritktchange((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyt_update_changed_options(s		
cC`s|j�}|rtStS(N(RsRnRo(R,RB((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyt
should_update:scC`smt�}|j�}td|jj��}|j�}|j|�|jtd|��|j|�|S(NRcRi(RltpresentRURfRSRmt_announce_deprecations(R,RBRit
reportableRf((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pytexec_module@s	

cC`sH|jdg�}x/|D]'}|jjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopRbt	deprecate(R,RBtwarningstwarning((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyRvLs


cC`s
|j�S(N(Rm(R,((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyRuTscC`s=|j�|_|j�stS|jjr/tS|j�tS(N(tread_current_from_deviceRXRtRoRbt
check_modeRntupdate_on_device(R,((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyRmWs
c`sM|jj�}dj|jjd|jjd�}y�|jjj|d|�}y|j�}Wn%tk
r��t	t
����nXd|kr�|ddkr�d|kr�t	|d��q�t	|j��nWnmtk
rH�dd	g}d
|kr3t
�fd�|D��r3tjd�tSnt	t
����nXdS(
Ns!https://{0}:{1}/mgmt/tm/sys/httpdtservertserver_porttjsontcodei�tmessagesRemote end closed connectionsConnection abortedR c3`s'|]}|t��kr|VqdS(N(R?(t.0ti(tex(sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pys	<genexpr>{si(Rft
api_paramstformatRetprovidertapitpatchR�t
ValueErrorRR?tcontentRQtanyttimetsleepRn(R,Rcturitresptresponsetvalid((R�sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyR�`s,
	
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/sys/httpdR�R�R�i�R�Rc(R�ReR�R�RdR�R�RR?R�RL(R,R�R�R�R�((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyR��s
(R-R.RYRkRsRtRxRvRuRmR�R�(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyRas										!tArgumentSpeccB`seZd�ZRS(cC`st|_tdtdd�dt�dtdd�dtdd�dtdd�d	tdd�d
tdd�dtdd�d
tdd�dtdddddddddg�dtdd�dtdd�dtdd��
}i|_|jjt�|jj|�dS(NR'ttypeR=RRR+RRR!RtboolRRRtchoicestalerttcrittdebugtemergterrortinfotnoticetwarnRR#trawR%(Rntsupports_check_modeRlt
argument_specRmR
(R,R�((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyRY�s:												(R-R.RY(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyR��scC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NR�R�RbRz(
R�RR�R�RaRxt	exit_jsonRt	fail_jsonR?(tspecRbtmmtresultsR�((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pytmain�s		t__main__($t
__future__RRRR�t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNR�tansible.module_utils.basicRtansible.module_utils.sixR	t%library.module_utils.network.f5.bigipR
t&library.module_utils.network.f5.commonRRR
tImportErrort%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commonRR6RLRNRTRUtobjectRVRaR�R�R-(((sQ/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_device_httpd.pyt<module>s@


hHD
UW
%|.	

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