From 75d8555e6cc27522c105b89c932b7e53d9a1d14e Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Sun, 30 Oct 2022 15:38:18 +0000 Subject: [PATCH] grafana: ansible-lint fixes --- roles/grafana/handlers/main.yml | 2 +- roles/grafana/tasks/main.yml | 25 ++++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/roles/grafana/handlers/main.yml b/roles/grafana/handlers/main.yml index 46142a8..8e3a94e 100644 --- a/roles/grafana/handlers/main.yml +++ b/roles/grafana/handlers/main.yml @@ -1,5 +1,5 @@ --- -- name: restart grafana +- name: Restart grafana ansible.builtin.systemd: name: grafana-container daemon_reload: true diff --git a/roles/grafana/tasks/main.yml b/roles/grafana/tasks/main.yml index 638f3d1..3ed3db6 100644 --- a/roles/grafana/tasks/main.yml +++ b/roles/grafana/tasks/main.yml @@ -1,16 +1,16 @@ --- -- name: create group +- name: Create group ansible.builtin.group: name: grafana -- name: create user +- name: Create user ansible.builtin.user: name: grafana comment: Podman Grafana group: grafana shell: /sbin/nologin -- name: copy host key +- name: Copy host key ansible.builtin.copy: dest: "{{ tls_private }}/grafana.key" src: "{{ tls_private }}/{{ inventory_hostname }}.key" @@ -19,40 +19,40 @@ group: grafana remote_src: true -- name: create service config +- name: Create service config ansible.builtin.template: dest: /etc/sysconfig/grafana-container src: grafana-container.sysconfig.j2 mode: 0600 owner: root group: "{{ ansible_wheel }}" - notify: restart grafana + notify: Restart grafana -- name: create service file +- name: Create service file ansible.builtin.template: dest: /etc/systemd/system/grafana-container.service src: grafana-container.service.j2 mode: 0644 owner: root group: "{{ ansible_wheel }}" - notify: restart grafana + notify: Restart grafana -- name: create ldap config +- name: Create ldap config ansible.builtin.template: dest: /etc/grafana-ldap.toml src: grafana-ldap.toml.j2 mode: 0640 owner: root group: grafana - notify: restart grafana + notify: Restart grafana -- name: enable service +- name: Enable service ansible.builtin.service: name: grafana-container state: started enabled: true -- name: copy nginx config +- name: Copy nginx config ansible.builtin.copy: dest: /etc/nginx/conf.d/{{ inventory_hostname }}/grafana-container.conf content: | @@ -63,5 +63,4 @@ mode: 0644 owner: root group: "{{ ansible_wheel }}" - notify: restart nginx - + notify: Restart nginx