Skip to content

Commit

Permalink
Merge pull request rossmcdonald#32 from nhanatl/manage-telegraf-servi…
Browse files Browse the repository at this point in the history
…ce-with-sudo

Start and restart telegraf using sudo
  • Loading branch information
rossmcdonald committed Jun 18, 2018
2 parents a59a228 + d1b412a commit 3980fcf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions handlers/main.yml
Expand Up @@ -4,6 +4,7 @@
service:
name: telegraf
state: restarted
become: true
when: telegraf_start_service

- name: pause
Expand All @@ -17,6 +18,7 @@
command: service telegraf status
ignore_errors: yes
register: telegraf_service_status
become: true
when: telegraf_start_service

- name: assert running
Expand Down
1 change: 1 addition & 0 deletions tasks/start.yml
Expand Up @@ -9,3 +9,4 @@
- "pause"
- "check status"
- "assert running"
become: true

0 comments on commit 3980fcf

Please sign in to comment.