add tasks for registry values

This commit is contained in:
Robert Kaussow 2019-08-22 16:16:01 +02:00
parent f2c2363c5a
commit 246c8b5cb0
4 changed files with 24 additions and 0 deletions

View File

@ -22,3 +22,12 @@ ucs_tls_key_path: /etc/pki/tls/private/mykey.pem
# subpath: # defaults to not set # subpath: # defaults to not set
# ou: # defaults to not set # ou: # defaults to not set
# state: # defaults to 'present' # state: # defaults to 'present'
ucs_repository_unmaintained_enabled: False
## Example:
# ucs_registry_extra:
# - path: timeserver
# value: "ntp.example.com"
# state: present
ucs_registry_extra: []

View File

@ -1,4 +1,5 @@
--- ---
- include_tasks: registry.yml
- include_tasks: users_groups.yml - include_tasks: users_groups.yml
- include_tasks: filesystem.yml - include_tasks: filesystem.yml
- import_tasks: tls.yml - import_tasks: tls.yml

10
tasks/registry.yml Normal file
View File

@ -0,0 +1,10 @@
---
- block:
- name: Set system settings to registry
ucr:
path: "{{ item.path }}"
value: "{{ item.value }}"
state: "{{ item.state | default('present') }}"
loop: "{{ __usc_registry_settings + ucs_registry_extra }}"
become: True
become_user: root

4
vars/main.yml Normal file
View File

@ -0,0 +1,4 @@
---
__usc_registry_settings:
- path: "repository/online/unmaintained"
value: "{{ 'yes' if ucs_repository_unmaintained_enabled else 'no' }}"