From 50e6c103495a78bb6ef76b3dec3e423253d43edd Mon Sep 17 00:00:00 2001 From: Marius Meyer Date: Mon, 3 Jun 2024 14:21:33 +0200 Subject: [PATCH] condensed directory creation; fixed permissions --- tasks/main.yaml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/tasks/main.yaml b/tasks/main.yaml index 89738f9..362cb3a 100644 --- a/tasks/main.yaml +++ b/tasks/main.yaml @@ -16,24 +16,17 @@ state: directory owner: root mode: "755" - recurse: yes with_items: ["/opt/gitea", "/var/lib/gitea"] -- name: Ensure data directory exists +- name: Ensure data and config directories exist ansible.builtin.file: - path: "/var/lib/gitea/data" - state: directory - owner: "{{ git_user.uid }}" - group: "{{ git_user.group }}" - mode: "700" - -- name: Ensure config directory exists - ansible.builtin.file: - path: "/var/lib/gitea/config" + path: "/var/lib/gitea/{{ item }}" state: directory owner: "{{ git_user.uid }}" group: "{{ git_user.group }}" mode: "700" + recurse: true + with_items: ["data", "config"] - name: Ensure docker daemon is started ansible.builtin.systemd: