fix playbook file to first create folder with right permissions before it is used

This commit is contained in:
erebion 2024-09-02 12:43:05 +02:00
parent 2f7d7b8ffd
commit 7c40eea5f5

View file

@ -87,6 +87,20 @@
state: present state: present
update_cache: true update_cache: true
- name: "Add directory that the repos get cloned into"
ansible.builtin.file:
path: "/opt/repos"
state: "directory"
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" - name: "Remove repos that already exist"
ansible.builtin.file: ansible.builtin.file:
path: "/opt/repos/{{ item }}" path: "/opt/repos/{{ item }}"
@ -115,13 +129,6 @@
delay: 2 delay: 2
retries: 20 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" - name: "Build Debian packages for tinyalsa"
ansible.builtin.shell: ansible.builtin.shell:
cmd: debuild -i -us -uc -b cmd: debuild -i -us -uc -b