influxdb: ansible-lint fixes

This commit is contained in:
Timo Makinen 2022-10-30 15:50:36 +00:00
parent 5907d1cef2
commit fe8abc7e0a
2 changed files with 12 additions and 12 deletions

View file

@ -1,5 +1,5 @@
--- ---
- name: restart influxdb - name: Restart influxdb
ansible.builtin.service: ansible.builtin.service:
name: influxdb name: influxdb
state: restarted state: restarted

View file

@ -1,5 +1,5 @@
--- ---
- name: enable repository - name: Enable repository
ansible.builtin.yum_repository: ansible.builtin.yum_repository:
name: influxdb name: influxdb
baseurl: https://repos.influxdata.com/rhel/$releasever/$basearch/stable baseurl: https://repos.influxdata.com/rhel/$releasever/$basearch/stable
@ -8,7 +8,7 @@
gpgkey: https://repos.influxdata.com/influxdb.key gpgkey: https://repos.influxdata.com/influxdb.key
enabled: true enabled: true
- name: install packages - name: Install packages
ansible.builtin.package: ansible.builtin.package:
name: "{{ item }}" name: "{{ item }}"
state: present state: present
@ -17,7 +17,7 @@
- influxdb2-cli - influxdb2-cli
# https://github.com/influxdata/influxdb/issues/22435 # https://github.com/influxdata/influxdb/issues/22435
- name: fix logrotate errors - name: Fix logrotate errors
ansible.builtin.file: ansible.builtin.file:
path: /etc/logrotate.d/influxdb path: /etc/logrotate.d/influxdb
state: file state: file
@ -25,7 +25,7 @@
owner: root owner: root
group: "{{ ansible_wheel }}" group: "{{ ansible_wheel }}"
- name: create data directory - name: Create data directory
ansible.builtin.file: ansible.builtin.file:
path: /export/influxdb path: /export/influxdb
state: directory state: directory
@ -33,7 +33,7 @@
owner: influxdb owner: influxdb
group: influxdb group: influxdb
- name: link data directory - name: Link data directory
ansible.builtin.file: ansible.builtin.file:
path: /srv/influxdb path: /srv/influxdb
src: /export/influxdb src: /export/influxdb
@ -42,28 +42,28 @@
group: "{{ ansible_wheel }}" group: "{{ ansible_wheel }}"
follow: false follow: false
- name: create config.toml - name: Create config.toml
ansible.builtin.copy: ansible.builtin.copy:
dest: /etc/influxdb/config.toml dest: /etc/influxdb/config.toml
src: config.toml src: config.toml
mode: 0644 mode: 0644
owner: root owner: root
group: "{{ ansible_wheel }}" group: "{{ ansible_wheel }}"
notify: restart influxdb notify: Restart influxdb
- name: enable service - name: Enable service
ansible.builtin.service: ansible.builtin.service:
name: influxdb name: influxdb
state: started state: started
enabled: true enabled: true
- name: allow nginx to connect influxdb - name: Allow nginx to connect influxdb
seboolean: seboolean:
name: httpd_can_network_connect name: httpd_can_network_connect
state: true state: true
persistent: true persistent: true
- name: create nginx config - name: Create nginx config
copy: copy:
dest: "/etc/nginx/conf.d/{{ inventory_hostname }}/influxdb.conf" dest: "/etc/nginx/conf.d/{{ inventory_hostname }}/influxdb.conf"
content: | content: |
@ -73,4 +73,4 @@
mode: 0644 mode: 0644
owner: root owner: root
group: "{{ ansible_wheel }}" group: "{{ ansible_wheel }}"
notify: restart nginx notify: Restart nginx