Skip to content

Commit

Permalink
Start and restart telegraf using sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
nhanatl committed Jun 18, 2018
1 parent a59a228 commit d1b412a
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
- "pause"
- "check status"
- "assert running"
become: true

0 comments on commit d1b412a

Please sign in to comment.