�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
m Z d e f d
� � YZ
d � Z e d k r� e � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys<
module: gconftool2
author:
- Kenneth D. Evensen (@kevensen)
short_description: Edit GNOME Configurations
description:
- This module allows for the manipulation of GNOME 2 Configuration via
gconftool-2. Please see the gconftool-2(1) man pages for more details.
version_added: "2.3"
options:
key:
description:
- A GConf preference key is an element in the GConf repository
that corresponds to an application preference. See man gconftool-2(1)
required: yes
value:
description:
- Preference keys typically have simple values such as strings,
integers, or lists of strings and integers. This is ignored if the state
is "get". See man gconftool-2(1)
value_type:
description:
- The type of value being set. This is ignored if the state is "get".
choices: [ bool, float, int, string ]
state:
description:
- The action to take upon the key/value.
required: yes
choices: [ absent, get, present ]
config_source:
description:
- Specify a configuration source to use rather than the default path.
See man gconftool-2(1)
direct:
description:
- Access the config database directly, bypassing server. If direct is
specified then the config_source must be specified as well.
See man gconftool-2(1)
type: bool
default: 'no'
s�
- name: Change the widget font to "Serif 12"
gconftool2:
key: "/desktop/gnome/interface/font_name"
value_type: "string"
value: "Serif 12"
s�
key:
description: The key specified in the module parameters
returned: success
type: str
sample: /desktop/gnome/interface/font_name
value_type:
description: The type of the value that was changed
returned: success
type: str
sample: string
value:
description: The value of the preference key after executing the module
returned: success
type: str
sample: "Serif 12"
...
( t
AnsibleModulet GConf2Preferencec B` s, e Z e d d � Z d � Z e d � Z RS( t c C` s: | | _ | | _ | | _ | | _ | | _ | | _ d S( N( t ansiblet keyt
value_typet valuet
config_sourcet direct( t selfR R R
R R R ( ( sE /usr/lib/python2.7/site-packages/ansible/modules/system/gconftool2.pyt __init__X s c C` s t S( N( t False( R ( ( sE /usr/lib/python2.7/site-packages/ansible/modules/system/gconftool2.pyt value_already_seta s c C` s� d } d } t } d } | j d k rL t | j � d k rL d | j } n | j r^ d } n d } y� | d k r� | d j | j � 7} n_ | d k r� | d j | | | j | | j | j � 7} n% | d
k r� | d j | j � 7} n | j j
| d t �\ } } } t | � d k rG| rM| j j d
d t
| � � qMn t } Wn* t k
rz}
| j j d
d |
� n X| | j � f S( s3 Helper function to perform gconftool-2 operations R
i s --config-source s --directs gconftool-2 t gets --get {0}t sets"