Skip to content

Commit

Permalink
Make service state and enabled configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
tersmitten committed Nov 7, 2017
1 parent 0864bb9 commit 2b6bfc3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
service:
name: haproxy
state: restarted
when: service_default_state | default('started') == 'started'
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
- name: start and enable service
service:
name: haproxy
state: started
enabled: true
state: "{{ service_default_state | default('started') }}"
enabled: "{{ service_default_enabled | default(true) | bool }}"
tags:
- configuration
- haproxy
Expand Down

0 comments on commit 2b6bfc3

Please sign in to comment.