From e74560c6efc556dfecdc6e83e77b3f2474626756 Mon Sep 17 00:00:00 2001 From: Charles Wright Date: Mon, 8 Aug 2022 22:08:09 -0500 Subject: [PATCH] Moved Conduit directory creation from setup.yml into setup_install.yml, as suggested by Slavi --- roles/matrix-conduit/tasks/conduit/setup.yml | 18 ------------------ .../tasks/conduit/setup_install.yml | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/roles/matrix-conduit/tasks/conduit/setup.yml b/roles/matrix-conduit/tasks/conduit/setup.yml index 9b3d4487..fa095f66 100644 --- a/roles/matrix-conduit/tasks/conduit/setup.yml +++ b/roles/matrix-conduit/tasks/conduit/setup.yml @@ -1,23 +1,5 @@ --- -- name: Ensure Conduit config path exists - ansible.builtin.file: - path: "{{ matrix_conduit_config_path }}" - state: directory - mode: 0750 - owner: "{{ matrix_user_username }}" - group: "{{ matrix_user_groupname }}" - when: "matrix_conduit_enabled | bool" - -- name: Ensure Conduit data path exists - ansible.builtin.file: - path: "{{ matrix_conduit_data_path }}" - state: directory - mode: 0770 - owner: "{{ matrix_user_username }}" - group: "{{ matrix_user_groupname }}" - when: "matrix_conduit_enabled | bool" - - import_tasks: "{{ role_path }}/tasks/conduit/setup_install.yml" when: "matrix_conduit_enabled | bool" diff --git a/roles/matrix-conduit/tasks/conduit/setup_install.yml b/roles/matrix-conduit/tasks/conduit/setup_install.yml index f86db34f..ac5be14d 100644 --- a/roles/matrix-conduit/tasks/conduit/setup_install.yml +++ b/roles/matrix-conduit/tasks/conduit/setup_install.yml @@ -10,6 +10,22 @@ delay: "{{ matrix_container_retries_delay }}" until: result is not failed +- name: Ensure Conduit config path exists + ansible.builtin.file: + path: "{{ matrix_conduit_config_path }}" + state: directory + mode: 0750 + owner: "{{ matrix_user_username }}" + group: "{{ matrix_user_groupname }}" + +- name: Ensure Conduit data path exists + ansible.builtin.file: + path: "{{ matrix_conduit_data_path }}" + state: directory + mode: 0770 + owner: "{{ matrix_user_username }}" + group: "{{ matrix_user_groupname }}" + - name: Ensure Conduit configuration installed ansible.builtin.template: src: "{{ role_path }}/templates/conduit/conduit.toml.j2"