Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/system/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/system/xfconf.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlmZdd
l
mZdefd��YZd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys�
module: xfconf
author:
    - "Joseph Benden (@jbenden)"
short_description: Edit XFCE4 Configurations
description:
  - This module allows for the manipulation of Xfce 4 Configuration via
    xfconf-query.  Please see the xfconf-query(1) man pages for more details.
version_added: "2.8"
options:
  channel:
    description:
    - A Xfconf preference channel is a top-level tree key, inside of the
      Xfconf repository that corresponds to the location for which all
      application properties/keys are stored. See man xfconf-query(1)
    required: yes
  property:
    description:
    - A Xfce preference key is an element in the Xfconf repository
      that corresponds to an application preference. See man xfconf-query(1)
    required: yes
  value:
    description:
    - Preference properties typically have simple values such as strings,
      integers, or lists of strings and integers. This is ignored if the state
      is "get". See man xfconf-query(1)
  value_type:
    description:
    - The type of value being set. This is ignored if the state is "get".
    choices: [ int, bool, float, string ]
  state:
    description:
    - The action to take upon the property/value.
    choices: [ get, present, absent ]
    default: "present"
s�
- name: Change the DPI to "192"
  xfconf:
    channel: "xsettings"
    property: "/Xft/DPI"
    value_type: "int"
    value: "192"
  become: True
  become_user: johnsmith

s
  channel:
    description: The channel specified in the module parameters
    returned: success
    type: str
    sample: "xsettings"
  property:
    description: The property specified in the module parameters
    returned: success
    type: str
    sample: "/Xft/DPI"
  value_type:
    description: The type of the value that was changed
    returned: success
    type: str
    sample: "int"
  value:
    description: The value of the preference key after executing the module
    returned: success
    type: str
    sample: "192"
...
N(t
AnsibleModule(tshlex_quotetXfconfPreferencecB`seZd�Zed�ZRS(cC`s1||_||_||_||_||_dS(N(tmoduletchanneltpropertyt
value_typetvalue(tselfRRR
RR((sA/usr/lib/python2.7/site-packages/ansible/modules/system/xfconf.pyt__init__`s
				c	C`sAt}d}dj|jjdt�t|j�t|j��}y�|dkr||djt|j�t|j	��7}n|dkr�|d7}n|jj
|dt�\}}}|d	ks�t|�d	kr�|r|jjd
dt
|��qnt}Wn*tk
r0}|jjd
d|�nX||j�fS(
s4 Helper function to perform xfconf-query operations ts {0} --channel {1} --property {2}sxfconf-querytsets --type {0} --create --set {1}tunsets --resettcheck_rcitmsgs"xfconf-query failed with error: %ss&xfconf-query failed with exception: %s(tFalsetformatRtget_bin_pathtTrueR	RR
RRtrun_commandtlent	fail_jsontstrtOSErrortrstrip(	Rt	call_typet
fail_onerrtchangedtouttcmdtrcterrt	exception((sA/usr/lib/python2.7/site-packages/ansible/modules/system/xfconf.pytcallgs&
!#
(t__name__t
__module__RRR)(((sA/usr/lib/python2.7/site-packages/ansible/modules/system/xfconf.pyR
_s	c
C`s�tdtdtdtdd�dtdtdd�dtdtdd	d
ddgdd�d
tdtdddd�dtddddddgdd��dt�}idd6dd6dd6}|jd}|jd}|jd}|jd
j�dkrd}n)|jd
dkr(d}n
|jd
}||jd}t}d}|dkr�|dksv|dkr�|jddt|��q�|dks�|dkr�|jddt|��q�nt	|||||�}	|	j
ddt�\}
}||kr:|jr"t}|}q@|	j
|�\}}n|}tdi|d6|d6|d6|d6|d6|d 6|jd
d!6�}|jd|d"|�dS(#Nt
argument_specRtrequiredttypeRR
RtchoicestinttbooltfloattstringRtdefaulttstatetpresenttgettabsenttsupports_check_modeRRttruetfalseRRs#State %s requires "value" to be sets(State %s requires "value_type" to be setR"txfconfR#t	new_valuetprevious_valuetplaybook_valuet
ansible_facts(
RtdictRRtNonetparamstlowerRRR
R)t
check_modet	exit_json(
Rtstate_valuesRR
RRR5tchangeR=R<tdummyt
current_valuetfacts((sA/usr/lib/python2.7/site-packages/ansible/modules/system/xfconf.pytmain�sf		


		
			t__main__(t
__future__RRRR.t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtsystansible.module_utils.basicRtansible.module_utils.six.movesR	tobjectR
RLR*(((sA/usr/lib/python2.7/site-packages/ansible/modules/system/xfconf.pyt<module>s


&&	Q

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