diff --git a/roles/mgrote_munin_server/defaults/main.yml b/roles/mgrote_munin_server/defaults/main.yml index 494f7465..aea18e28 100644 --- a/roles/mgrote_munin_server/defaults/main.yml +++ b/roles/mgrote_munin_server/defaults/main.yml @@ -14,12 +14,6 @@ munin_packages: - s-nail - libfile-readbackwards-perl munin_servername: "{{ ansible_fqdn }}.mgrote.net" -munin_dirs: - - /var/run/munin - - /etc/munin/plugins - - /var/cache/munin/www - - /var/lib/munin - - /var/cache/munin munin_server_plugins: - munin_stats - munin_update diff --git a/roles/mgrote_munin_server/tasks/main.yml b/roles/mgrote_munin_server/tasks/main.yml index 5577990a..bb15dd4f 100644 --- a/roles/mgrote_munin_server/tasks/main.yml +++ b/roles/mgrote_munin_server/tasks/main.yml @@ -7,32 +7,32 @@ - name: Ensure needed dirs exists ansible.builtin.file: - path: "{{ item }}" + path: "{{ item.name }}" state: directory - mode: '0755' - owner: munin - group: munin + mode: "{{ item.mode }}" + owner: "{{ item.owner }}" + group: "{{ item.group }}" loop: - name: /var/run/munin mode: '0755' - owner: root - group: root + owner: munin + group: munin - name: /etc/munin/plugins mode: '0755' - owner: root - group: root + owner: munin + group: munin - name: /var/cache/munin/www mode: '0755' - owner: root - group: root + owner: munin + group: munin - name: /var/lib/munin mode: '0755' - owner: root - group: root + owner: munin + group: munin - name: /var/cache/munin mode: '0755' - owner: root - group: root + owner: munin + group: munin - name: Ensure permissions are set ansible.builtin.file: