remove old loop syntax
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2019-08-27 08:25:49 +02:00
parent d38c6da979
commit 46ab508260
4 changed files with 12 additions and 10 deletions

View File

@ -8,6 +8,8 @@ ucs_tls_key_dir: /etc/pki/tls/private
ucs_tls_cert_path: /etc/pki/tls/certs/mycert.pem ucs_tls_cert_path: /etc/pki/tls/certs/mycert.pem
ucs_tls_key_path: /etc/pki/tls/private/mykey.pem ucs_tls_key_path: /etc/pki/tls/private/mykey.pem
ucs_filesystem_acl: []
## Example:
# ucs_filesystem_acl: # ucs_filesystem_acl:
# - path: /shares/mydocuments # needs to be set # - path: /shares/mydocuments # needs to be set
# entity: john # needs to be set # entity: john # needs to be set
@ -16,6 +18,8 @@ ucs_tls_key_path: /etc/pki/tls/private/mykey.pem
# state: # defaults to 'query' # state: # defaults to 'query'
# recursive: # defaults to 'no' # recursive: # defaults to 'no'
ucs_system_groups: []
## Example:
# ucs_system_groups: # ucs_system_groups:
# - name: fs-mydocuments-rw # needs to be set # - name: fs-mydocuments-rw # needs to be set
# description: # defaults to not set # description: # defaults to not set
@ -25,9 +29,9 @@ ucs_tls_key_path: /etc/pki/tls/private/mykey.pem
ucs_repository_unmaintained_enabled: False ucs_repository_unmaintained_enabled: False
ucs_registry_extra: []
## Example: ## Example:
# ucs_registry_extra: # ucs_registry_extra:
# - path: timeserver # - path: timeserver
# value: "ntp.example.com" # value: "ntp.example.com"
# state: present # state: present
ucs_registry_extra: []

View File

@ -8,9 +8,8 @@
state: "{{ item.state | default('query') }}" state: "{{ item.state | default('query') }}"
recursive: "{{ item.recursive | default('no') }}" recursive: "{{ item.recursive | default('no') }}"
default: "{{ item.default | default('no') }}" default: "{{ item.default | default('no') }}"
with_items: "{{ ucs_filesystem_acl }}" loop: "{{ ucs_filesystem_acl }}"
loop_control: loop_control:
label: "{{ item.path }}" label: "{{ item.path }}"
when: ucs_filesystem_acl is defined
become: True become: True
become_user: root become_user: root

View File

@ -5,7 +5,7 @@
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
mode: 700 mode: 700
with_items: loop:
- "{{ ucs_tls_certs_dir }}" - "{{ ucs_tls_certs_dir }}"
- "{{ ucs_tls_key_dir }}" - "{{ ucs_tls_key_dir }}"
@ -14,7 +14,7 @@
src: "{{ item.src }}" src: "{{ item.src }}"
dest: "{{ item.dest }}" dest: "{{ item.dest }}"
mode: "{{ item.mode }}" mode: "{{ item.mode }}"
with_items: loop:
- { src: "{{ ucs_tls_cert_path }}", dest: "{{ ucs_tls_certs_dir }}/ucs.pem", mode: '0600' } - { src: "{{ ucs_tls_cert_path }}", dest: "{{ ucs_tls_certs_dir }}/ucs.pem", mode: '0600' }
- { src: "{{ ucs_tls_key_path }}", dest: "{{ ucs_tls_key_dir }}/ucs.pem", mode: '0750' } - { src: "{{ ucs_tls_key_path }}", dest: "{{ ucs_tls_key_dir }}/ucs.pem", mode: '0750' }
loop_control: loop_control:
@ -28,7 +28,7 @@
ucr: ucr:
path: "{{ item.path }}" path: "{{ item.path }}"
value: "{{ item.value }}" value: "{{ item.value }}"
with_items: loop:
- { path: apache2/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" } - { path: apache2/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" }
- { path: apache2/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" } - { path: apache2/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" }
loop_control: loop_control:
@ -40,7 +40,7 @@
ucr: ucr:
path: "{{ item.path }}" path: "{{ item.path }}"
value: "{{ item.value }}" value: "{{ item.value }}"
with_items: loop:
- { path: mail/dovecot/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" } - { path: mail/dovecot/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" }
- { path: mail/dovecot/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" } - { path: mail/dovecot/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" }
loop_control: loop_control:
@ -52,7 +52,7 @@
ucr: ucr:
path: "{{ item.path }}" path: "{{ item.path }}"
value: "{{ item.value }}" value: "{{ item.value }}"
with_items: loop:
- { path: mail/postfix/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" } - { path: mail/postfix/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" }
- { path: mail/postfix/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" } - { path: mail/postfix/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" }
loop_control: loop_control:

View File

@ -6,9 +6,8 @@
subpath: "{{ item.subpath | default(omit) }}" subpath: "{{ item.subpath | default(omit) }}"
ou: "{{ item.ou | default(omit) }}" ou: "{{ item.ou | default(omit) }}"
state: "{{ item.state | default('present') }}" state: "{{ item.state | default('present') }}"
with_items: "{{ ucs_system_groups }}" loop: "{{ ucs_system_groups }}"
loop_control: loop_control:
label: "{{ item.name }}" label: "{{ item.name }}"
when: ucs_system_groups is defined
become: True become: True
become_user: root become_user: root