grafana: ansible-lint fixes

This commit is contained in:
Timo Makinen 2022-10-30 15:38:18 +00:00
parent de90ffc636
commit 75d8555e6c
2 changed files with 13 additions and 14 deletions

View file

@ -1,5 +1,5 @@
--- ---
- name: restart grafana - name: Restart grafana
ansible.builtin.systemd: ansible.builtin.systemd:
name: grafana-container name: grafana-container
daemon_reload: true daemon_reload: true

View file

@ -1,16 +1,16 @@
--- ---
- name: create group - name: Create group
ansible.builtin.group: ansible.builtin.group:
name: grafana name: grafana
- name: create user - name: Create user
ansible.builtin.user: ansible.builtin.user:
name: grafana name: grafana
comment: Podman Grafana comment: Podman Grafana
group: grafana group: grafana
shell: /sbin/nologin shell: /sbin/nologin
- name: copy host key - name: Copy host key
ansible.builtin.copy: ansible.builtin.copy:
dest: "{{ tls_private }}/grafana.key" dest: "{{ tls_private }}/grafana.key"
src: "{{ tls_private }}/{{ inventory_hostname }}.key" src: "{{ tls_private }}/{{ inventory_hostname }}.key"
@ -19,40 +19,40 @@
group: grafana group: grafana
remote_src: true remote_src: true
- name: create service config - name: Create service config
ansible.builtin.template: ansible.builtin.template:
dest: /etc/sysconfig/grafana-container dest: /etc/sysconfig/grafana-container
src: grafana-container.sysconfig.j2 src: grafana-container.sysconfig.j2
mode: 0600 mode: 0600
owner: root owner: root
group: "{{ ansible_wheel }}" group: "{{ ansible_wheel }}"
notify: restart grafana notify: Restart grafana
- name: create service file - name: Create service file
ansible.builtin.template: ansible.builtin.template:
dest: /etc/systemd/system/grafana-container.service dest: /etc/systemd/system/grafana-container.service
src: grafana-container.service.j2 src: grafana-container.service.j2
mode: 0644 mode: 0644
owner: root owner: root
group: "{{ ansible_wheel }}" group: "{{ ansible_wheel }}"
notify: restart grafana notify: Restart grafana
- name: create ldap config - name: Create ldap config
ansible.builtin.template: ansible.builtin.template:
dest: /etc/grafana-ldap.toml dest: /etc/grafana-ldap.toml
src: grafana-ldap.toml.j2 src: grafana-ldap.toml.j2
mode: 0640 mode: 0640
owner: root owner: root
group: grafana group: grafana
notify: restart grafana notify: Restart grafana
- name: enable service - name: Enable service
ansible.builtin.service: ansible.builtin.service:
name: grafana-container name: grafana-container
state: started state: started
enabled: true enabled: true
- name: copy nginx config - name: Copy nginx config
ansible.builtin.copy: ansible.builtin.copy:
dest: /etc/nginx/conf.d/{{ inventory_hostname }}/grafana-container.conf dest: /etc/nginx/conf.d/{{ inventory_hostname }}/grafana-container.conf
content: | content: |
@ -63,5 +63,4 @@
mode: 0644 mode: 0644
owner: root owner: root
group: "{{ ansible_wheel }}" group: "{{ ansible_wheel }}"
notify: restart nginx notify: Restart nginx