dominikkaminski / dominikkaminski.ucs_modules / 0.0.3 / module / univention_config_registry Accessing the Univention Config Registry Authors: Moritz Bunkus (@MoritzBunkus)dominikkaminski.ucs_modules.univention_config_registry (0.0.3) — module
Install with ansible-galaxy collection install dominikkaminski.ucs_modules:==0.0.3
collections: - name: dominikkaminski.ucs_modules version: 0.0.3
You can set and unset keys in the Univention Config Registry.
# Set various keys - name: Set proxy configuration univention_config_registry: keys: proxy/http: http://myproxy.mydomain:3128 proxy/https: http://myproxy.mydomain:3128
# Alternative syntax with use of Jinja. - name: Set /etc/hosts entries univention_config_registry: kvlist: - key: "hosts/static/{{ item }}" value: myhost.fqdn loop: [ '192.168.0.1', '192.168.1.1' ]
# Clear proxy configuration - name: Do not use a proxy univention_config_registry: keys: proxy/http: proxy/https: state: absent
keys: description: - A dict of keys to set or unset. In case of unsetting, the values are ignored. - Either this or 'kvlist' must be given. required: false type: str state: choices: - absent - present default: present description: - Either 'present' for setting the key/value pairs given with 'keys' or 'absent' for unsetting the keys from the 'keys' dict. Default is 'present'. type: str kvlist: description: - You pass in a list of dicts with this parameter instead of using a dict via 'keys'. Each of the dicts passed via 'kvlist' must contain the keys 'key' and 'value'. This allows the use of Jinja in the UCR keys to set/unset. - Either this or 'keys' must be given. required: false
message: description: A human-readable information about which keys where changed meta['changed_keys']: description: A list of all key names that were changed type: array