From 4322856559ccb2b9492fbe205bc8c47b874b5a1d Mon Sep 17 00:00:00 2001 From: jaydee Date: Mon, 23 Oct 2023 11:29:07 +0200 Subject: [PATCH] upt playbook --- hosts.yml | 2 ++ playbooks/sync_mailu2.yaml | 11 ++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hosts.yml b/hosts.yml index 8647a24..57eab6b 100644 --- a/hosts.yml +++ b/hosts.yml @@ -65,6 +65,8 @@ datacenter: ansible_python_interpreter: /usr/bin/python ansible_user: admin ansible_pass: l4c1j4yd33Du5lo + ansible_become_user: admin + ansible_become_password: l4c1j4yd33Du5lo nas: hosts: 192.168.77.106: diff --git a/playbooks/sync_mailu2.yaml b/playbooks/sync_mailu2.yaml index 3ce707e..363e908 100644 --- a/playbooks/sync_mailu2.yaml +++ b/playbooks/sync_mailu2.yaml @@ -2,10 +2,11 @@ name: Stop mailu ignore_unreachable: false tasks: - - name: Extract + - name: fix permissions + file: + path: /share/docker_data/mailu2/ + owner: admin + group: administrators + recurse: yes become: true - ansible.builtin.unarchive: - src: /tmp/dockers-{{ ansible_date_time.date }}.tar.gz - dest: / - remote_src: yes when: inventory_hostname in groups['raspberry'] \ No newline at end of file