mirror of
https://github.com/dj-wasabi/ansible-telegraf.git
synced 2025-07-17 08:46:37 +00:00
Merge pull request #134 from dj-wasabi/fix-ansible-lint-issues
Using command instead of shell module
This commit is contained in:
@ -1,9 +1,5 @@
|
|||||||
---
|
---
|
||||||
repos:
|
repos:
|
||||||
# - repo: https://github.com/dj-wasabi/pre-commit-hooks
|
|
||||||
# rev: master
|
|
||||||
# hooks:
|
|
||||||
# - id: ansible-lint
|
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v3.2.0
|
rev: v3.2.0
|
||||||
hooks:
|
hooks:
|
||||||
|
@ -14,11 +14,11 @@
|
|||||||
notify: "Restart Telegraf"
|
notify: "Restart Telegraf"
|
||||||
|
|
||||||
- name: "FreeBSD | add telegraf_flags for extra plugins"
|
- name: "FreeBSD | add telegraf_flags for extra plugins"
|
||||||
shell: sysrc telegraf_flags="-quiet -config-directory=/usr/local/etc/telegraf.d"
|
command: sysrc telegraf_flags="-quiet -config-directory=/usr/local/etc/telegraf.d"
|
||||||
tags:
|
tags:
|
||||||
- skip_ansible_lint
|
- skip_ansible_lint
|
||||||
|
|
||||||
- name: "FreeBSD | add telegraf to init"
|
- name: "FreeBSD | add telegraf to init"
|
||||||
shell: sysrc telegraf_enable="YES"
|
command: sysrc telegraf_enable="YES"
|
||||||
tags:
|
tags:
|
||||||
- skip_ansible_lint
|
- skip_ansible_lint
|
||||||
|
@ -150,7 +150,7 @@
|
|||||||
name: smartmontools
|
name: smartmontools
|
||||||
|
|
||||||
- name: Find path of smartctl
|
- name: Find path of smartctl
|
||||||
shell: which smartctl
|
command: which smartctl
|
||||||
register: which_smartctl
|
register: which_smartctl
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
@ -122,7 +122,7 @@
|
|||||||
meta: flush_handlers
|
meta: flush_handlers
|
||||||
|
|
||||||
- name: "Start Telegraf (If it wasn't running)"
|
- name: "Start Telegraf (If it wasn't running)"
|
||||||
shell: brew services start telegraf
|
command: brew services start telegraf
|
||||||
register: brew_services_start_telegraf
|
register: brew_services_start_telegraf
|
||||||
changed_when: '"Successfully started `telegraf`" in brew_services_start_telegraf.stdout'
|
changed_when: '"Successfully started `telegraf`" in brew_services_start_telegraf.stdout'
|
||||||
when: not telegraf_agent_docker
|
when: not telegraf_agent_docker
|
||||||
|
Reference in New Issue
Block a user