From 77155a81577cb5a0b4cb0ee88a334b422c928a01 Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Sun, 30 Oct 2022 17:41:51 +0000 Subject: [PATCH] munin_server: ansible-lint fixes --- roles/munin_server/tasks/main.yml | 64 +++++++++++++++---------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/roles/munin_server/tasks/main.yml b/roles/munin_server/tasks/main.yml index 58f6b60..1e6911e 100644 --- a/roles/munin_server/tasks/main.yml +++ b/roles/munin_server/tasks/main.yml @@ -1,16 +1,16 @@ --- -- name: install packages - package: +- name: Install packages + ansible.builtin.package: name: munin state: installed -- name: set file contexts for data directory - sefcontext: +- name: Set file contexts for data directory + community.general.sefcontext: path: "/export/munin(/.*)?" setype: munin_var_lib_t -- name: create data direcory - file: +- name: Create data direcory + ansible.builtin.file: path: /export/munin state: directory mode: 0755 @@ -18,8 +18,8 @@ group: munin setype: _default -- name: link data directory - file: +- name: Link data directory + ansible.builtin.file: dest: /srv/munin src: /export/munin state: link @@ -28,29 +28,29 @@ follow: false # for some reason this is owned by adm default -- name: fix log directory group - file: +- name: Fix log directory group + ansible.builtin.file: path: /var/log/munin state: directory mode: 0750 owner: munin group: apache -- name: add munin to hostkey group - user: +- name: Add munin to hostkey group + ansible.builtin.user: name: munin groups: hostkey append: true # this needs better rule -- name: fix selinux write errors - seboolean: +- name: Fix SELinux write errors + ansible.posix.seboolean: name: domain_can_mmap_files state: true persistent: true -- name: create apache config - copy: +- name: Create apache config + ansible.builtin.copy: dest: /etc/httpd/conf.local.d/munin.conf src: munin-apache.conf mode: 0644 @@ -58,21 +58,21 @@ group: "{{ ansible_wheel }}" notify: restart apache -- name: fix selinx contexts from cache directory - sefcontext: +- name: Fix SELinx contexts from cache directory + community.general.sefcontext: path: "/var/run/munin/cgi-tmp(/.*)?" setype: munin_rw_content_t -- name: add cache direcory to tmpfiles - copy: +- name: Add cache direcory to tmpfiles + ansible.builtin.copy: dest: /etc/tmpfiles.d/munin.conf src: munin-tmpfiles.conf mode: 0644 owner: root group: "{{ ansible_wheel }}" -- name: create cache directory - file: +- name: Create cache directory + ansible.builtin.file: path: /var/run/munin/cgi-tmp state: directory mode: 0755 @@ -80,37 +80,37 @@ group: apache setype: _default -- name: create tls config - template: +- name: Create tls config + ansible.builtin.template: dest: /etc/munin/conf.d/00-tls.conf src: tls.conf.j2 mode: 0644 owner: root group: "{{ ansible_wheel }}" -- name: create host config - template: +- name: Create host config + ansible.builtin.template: dest: /etc/munin/conf.d/hosts.conf src: hosts.conf.j2 mode: 0644 owner: root group: "{{ ansible_wheel }}" -- name: create override config - copy: +- name: Create override config + ansible.builtin.copy: dest: /etc/munin/conf.d/00-override.conf src: override.conf mode: 0644 owner: root group: "{{ ansible_wheel }}" -- name: remove localhost node - file: +- name: Remove localhost node + ansible.builtin.file: path: /etc/munin/conf.d/local.conf state: absent -- name: enable cron job - systemd: +- name: Enable cron job + ansible.builtin.systemd: name: munin.timer state: started enabled: true