From 2d09e71f87dd87cc3b30ec0412812177461a8bf9 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 8 Jan 2021 17:40:55 +0100 Subject: [PATCH] creating directories and using loops --- tasks/main.yml | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 7ed6398..9b7d14c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -17,28 +17,24 @@ state: directory dest: "{{ tmpdir }}/src/themes/{{ theme }}" +- name: Create folders + delegate_to: localhost + file: + state: directory + dest: "{{ tmpdir }}/src/themes/{{ theme }}/{{ item }}" + loop: + - account + - admin + - email + - login + - name: Create properties for account delegate_to: localhost template: - src: "account/theme.properties.j2" - dest: "{{ tmpdir }}/src/themes/{{ theme }}/account/theme.properties" - -- name: Create properties for admin - delegate_to: localhost - template: - src: "admin/theme.properties.j2" - dest: "{{ tmpdir }}/src/themes/{{ theme }}/admin/theme.properties" - -- name: Create properties for email - delegate_to: localhost - template: - src: "email/theme.properties.j2" - dest: "{{ tmpdir }}/src/themes/{{ theme }}/email/theme.properties" - -- name: Create properties for login - delegate_to: localhost - template: - src: "login/theme.properties.j2" - dest: "{{ tmpdir }}/src/themes/{{ theme }}/login/theme.properties" - - + src: "{{ item }}/theme.properties.j2" + dest: "{{ tmpdir }}/src/themes/{{ theme }}/{{ item }}/theme.properties" + loop: + - account + - admin + - email + - login