chore: fix syntax for ansible-lint

This commit is contained in:
Adrien Waksberg 2023-06-29 14:57:41 +02:00
parent b865f21bcf
commit a3138ac6ec
4 changed files with 15 additions and 15 deletions

View file

@ -1,5 +1,5 @@
--- ---
telegraf_distribution_release: "{{ ansible_distribution_release }}" telegraf_distribution_release: "{{ ansible_distribution_release }}"
telegraf_default_config: telegraf_default_config:
agent: agent:
interval: 10s interval: 10s

View file

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

View file

@ -6,7 +6,7 @@ galaxy_info:
company: Adrien Waksberg company: Adrien Waksberg
description: Install and configure Telegraf description: Install and configure Telegraf
license: Apache2 license: Apache2
min_ansible_version: 2.9 min_ansible_version: "2.9"
platforms: platforms:
- name: Debian - name: Debian

View file

@ -1,56 +1,56 @@
--- ---
- name: install depencies packages - name: Install depencies packages
ansible.builtin.package: ansible.builtin.package:
name: name:
- apt-transport-https - apt-transport-https
- gpg - gpg
tags: telegraf tags: telegraf
- name: add key for influx repository - name: Add key for influx repository
ansible.builtin.apt_key: ansible.builtin.apt_key:
url: https://repos.influxdata.com/influxdata-archive_compat.key url: https://repos.influxdata.com/influxdata-archive_compat.key
tags: telegraf tags: telegraf
- name: add influx repository - name: Add influx repository
ansible.builtin.apt_repository: ansible.builtin.apt_repository:
filename: influx filename: influx
repo: "deb https://repos.influxdata.com/debian {{ telegraf_distribution_release }} stable" repo: "deb https://repos.influxdata.com/debian {{ telegraf_distribution_release }} stable"
tags: telegraf tags: telegraf
- name: install influxdb package - name: Install influxdb package
ansible.builtin.package: ansible.builtin.package:
name: name:
- telegraf - telegraf
tags: telegraf tags: telegraf
- name: add groups for telegraf user - name: Add groups for telegraf user
ansible.builtin.user: ansible.builtin.user:
name: telegraf name: telegraf
groups: "{{ telegraf_user_groups }}" groups: "{{ telegraf_user_groups }}"
notify: restart telegraf notify: Restart telegraf
tags: telegraf tags: telegraf
- name: copy default variables file - name: Copy default variables file
ansible.builtin.template: ansible.builtin.template:
src: default.j2 src: default.j2
dest: /etc/default/telegraf dest: /etc/default/telegraf
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
notify: restart telegraf notify: Restart telegraf
tags: telegraf tags: telegraf
- name: copy config file - name: Copy config file
ansible.builtin.template: ansible.builtin.template:
src: telegraf.conf.j2 src: telegraf.conf.j2
dest: /etc/telegraf/telegraf.conf dest: /etc/telegraf/telegraf.conf
owner: root owner: root
group: telegraf group: telegraf
mode: 0640 mode: 0640
notify: restart telegraf notify: Restart telegraf
tags: telegraf tags: telegraf
- name: start and enable service - name: Start and enable service
ansible.builtin.service: ansible.builtin.service:
name: telegraf name: telegraf
state: started state: started