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: