Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/remote_management/cobbler/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/remote_management/cobbler/cobbler_sync.pyo

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlZddlm
Z
dd
lmZddlmZd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys
---
module: cobbler_sync
version_added: '2.7'
short_description: Sync Cobbler
description:
- Sync Cobbler to commit changes.
options:
  host:
    description:
    - The name or IP address of the Cobbler system.
    default: 127.0.0.1
  port:
    description:
    - Port number to be used for REST connection.
    - The default value depends on parameter C(use_ssl).
  username:
    description:
    - The username to log in to Cobbler.
    default: cobbler
  password:
    description:
    - The password to log in to Cobbler.
    required: yes
  use_ssl:
    description:
    - If C(no), an HTTP connection will be used instead of the default HTTPS connection.
    type: bool
    default: 'yes'
  validate_certs:
    description:
    - If C(no), SSL certificates will not be validated.
    - This should only set to C(no) when used on personally controlled sites using self-signed certificates.
    type: bool
    default: 'yes'
author:
- Dag Wieers (@dagwieers)
todo:
notes:
- Concurrently syncing Cobbler is bound to fail with weird errors.
- On python 2.7.8 and older (i.e. on RHEL7) you may need to tweak the python behaviour to disable certificate validation.
  More information at L(Certificate verification in Python standard library HTTP clients,https://access.redhat.com/articles/2039753).
s�
- name: Commit Cobbler changes
  cobbler_sync:
    host: cobbler01
    username: cobbler
    password: MySuperSecureP4sswOrd
  run_once: yes
  delegate_to: localhost
s
# Default return values
N(t
AnsibleModule(t
xmlrpc_client(tto_textcC`s�tdtdtdddd�dtdd�d	tdddd
�dtdddt�d
tdddt�dtdddt��dt�}|jd	}|jd}|jd}|jd
}|jd}|r�dnd|jd<|s|r�dnd|jd<ntdt�}tjj�}d}|suytj�}Wnt	k
retj
t_quXtjt_
ndj|j�}	|r�tj|	d|�}
ntj|	�}
y|
j||�}Wn~tjk
r}|jddjd|	dt|�|j��n;tk
rJ}|jddjd|	dt|���nX|js�y|
j|�Wq�tk
r�}|jddjdt|���q�Xntjj�|}
|jd|
j|�dS( Nt
argument_specthostttypetstrtdefaults	127.0.0.1tporttinttusernametcobblertpasswordtno_logtuse_ssltbooltvalidate_certstsupports_check_modethttpsthttptprotot443t80tchangeds#{proto}://{host}:{port}/cobbler_apitcontexttmsgs<Failed to log in to Cobbler '{url}' as '{username}'. {error}turlterrors%Connection to '{url}' failed. {error}sFailed to sync Cobbler. {error}telapsed(RtdicttTruetparamstdatetimetutcnowtNonetssltcreate_unverified_contexttAttributeErrort_create_unverified_contextt_create_default_contextt _create_unverified_https_contextt_create_default_https_contexttformatR	tServerProxytServertlogintFaultt	fail_jsonR
t	Exceptiont
check_modetsynct	exit_jsontseconds(tmoduleRRRRRtresulttstarttssl_contextR"tconnttokenteR$((sZ/usr/lib/python2.7/site-packages/ansible/modules/remote_management/cobbler/cobbler_sync.pytmainPsX	




	
1,	)t__main__(t
__future__RRRR
t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNR(R+tansible.module_utils.basicRtansible.module_utils.six.movesR	tansible.module_utils._textR
RDt__name__(((sZ/usr/lib/python2.7/site-packages/ansible/modules/remote_management/cobbler/cobbler_sync.pyt<module>s


,
	=

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