mirror of
https://github.com/dj-wasabi/ansible-telegraf.git
synced 2025-07-17 08:46:37 +00:00
Using command instead of shell module
This commit is contained in:
@ -1,9 +1,5 @@
|
||||
---
|
||||
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
|
||||
rev: v3.2.0
|
||||
hooks:
|
||||
|
@ -14,11 +14,11 @@
|
||||
notify: "Restart Telegraf"
|
||||
|
||||
- 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:
|
||||
- skip_ansible_lint
|
||||
|
||||
- name: "FreeBSD | add telegraf to init"
|
||||
shell: sysrc telegraf_enable="YES"
|
||||
command: sysrc telegraf_enable="YES"
|
||||
tags:
|
||||
- skip_ansible_lint
|
||||
|
@ -150,7 +150,7 @@
|
||||
name: smartmontools
|
||||
|
||||
- name: Find path of smartctl
|
||||
shell: which smartctl
|
||||
command: which smartctl
|
||||
register: which_smartctl
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
|
@ -122,7 +122,7 @@
|
||||
meta: flush_handlers
|
||||
|
||||
- name: "Start Telegraf (If it wasn't running)"
|
||||
shell: brew services start telegraf
|
||||
command: brew services start telegraf
|
||||
register: brew_services_start_telegraf
|
||||
changed_when: '"Successfully started `telegraf`" in brew_services_start_telegraf.stdout'
|
||||
when: not telegraf_agent_docker
|
||||
|
Reference in New Issue
Block a user