From 46895760c4f5c5d16cbbc7ed39bd829569589dc4 Mon Sep 17 00:00:00 2001 From: erebion Date: Mon, 2 Sep 2024 12:43:05 +0200 Subject: [PATCH] fix playbook file to first create folder with right permissions before it is used --- ansible/audio.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/ansible/audio.yml b/ansible/audio.yml index f3ffb1d..0f46e40 100644 --- a/ansible/audio.yml +++ b/ansible/audio.yml @@ -87,6 +87,20 @@ state: present update_cache: true + - name: "Add directory that the repos get cloned into" + ansible.builtin.file: + path: "/opt/repos" + state: "present" + owner: nobody + group: nogroup + + - name: "chown repo directories to nobody:nogroup" + ansible.builtin.file: + path: "/opt/repos/" + recurse: true + owner: nobody + group: nogroup + - name: "Remove repos that already exist" ansible.builtin.file: path: "/opt/repos/{{ item }}" @@ -115,13 +129,6 @@ delay: 2 retries: 20 - - name: "chown repo directories to nobody:nogroup" - ansible.builtin.file: - path: "/opt/repos/" - recurse: true - owner: nobody - group: nogroup - - name: "Build Debian packages for tinyalsa" ansible.builtin.shell: cmd: debuild -i -us -uc -b