From 46ab508260b56e0d25ffc54a8a7c57211a06ba68 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 27 Aug 2019 08:25:49 +0200 Subject: [PATCH] remove old loop syntax --- defaults/main.yml | 6 +++++- tasks/filesystem.yml | 3 +-- tasks/tls.yml | 10 +++++----- tasks/users_groups.yml | 3 +-- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 9e91036..65bd403 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -8,6 +8,8 @@ ucs_tls_key_dir: /etc/pki/tls/private ucs_tls_cert_path: /etc/pki/tls/certs/mycert.pem ucs_tls_key_path: /etc/pki/tls/private/mykey.pem +ucs_filesystem_acl: [] +## Example: # ucs_filesystem_acl: # - path: /shares/mydocuments # 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' # recursive: # defaults to 'no' +ucs_system_groups: [] +## Example: # ucs_system_groups: # - name: fs-mydocuments-rw # needs to be 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_registry_extra: [] ## Example: # ucs_registry_extra: # - path: timeserver # value: "ntp.example.com" # state: present -ucs_registry_extra: [] diff --git a/tasks/filesystem.yml b/tasks/filesystem.yml index 882cc03..a9e3627 100644 --- a/tasks/filesystem.yml +++ b/tasks/filesystem.yml @@ -8,9 +8,8 @@ state: "{{ item.state | default('query') }}" recursive: "{{ item.recursive | default('no') }}" default: "{{ item.default | default('no') }}" - with_items: "{{ ucs_filesystem_acl }}" + loop: "{{ ucs_filesystem_acl }}" loop_control: label: "{{ item.path }}" - when: ucs_filesystem_acl is defined become: True become_user: root diff --git a/tasks/tls.yml b/tasks/tls.yml index 3e40cef..629ac29 100644 --- a/tasks/tls.yml +++ b/tasks/tls.yml @@ -5,7 +5,7 @@ path: "{{ item }}" state: directory mode: 700 - with_items: + loop: - "{{ ucs_tls_certs_dir }}" - "{{ ucs_tls_key_dir }}" @@ -14,7 +14,7 @@ src: "{{ item.src }}" dest: "{{ item.dest }}" mode: "{{ item.mode }}" - with_items: + loop: - { 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' } loop_control: @@ -28,7 +28,7 @@ ucr: path: "{{ item.path }}" value: "{{ item.value }}" - with_items: + loop: - { path: apache2/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" } - { path: apache2/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" } loop_control: @@ -40,7 +40,7 @@ ucr: path: "{{ item.path }}" value: "{{ item.value }}" - with_items: + loop: - { path: mail/dovecot/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" } - { path: mail/dovecot/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" } loop_control: @@ -52,7 +52,7 @@ ucr: path: "{{ item.path }}" value: "{{ item.value }}" - with_items: + loop: - { path: mail/postfix/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" } - { path: mail/postfix/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" } loop_control: diff --git a/tasks/users_groups.yml b/tasks/users_groups.yml index 6ac6f34..8ae7734 100644 --- a/tasks/users_groups.yml +++ b/tasks/users_groups.yml @@ -6,9 +6,8 @@ subpath: "{{ item.subpath | default(omit) }}" ou: "{{ item.ou | default(omit) }}" state: "{{ item.state | default('present') }}" - with_items: "{{ ucs_system_groups }}" + loop: "{{ ucs_system_groups }}" loop_control: label: "{{ item.name }}" - when: ucs_system_groups is defined become: True become_user: root