Skip to content

Commit

Permalink
Ensure services are running.
Browse files Browse the repository at this point in the history
Added state=started for alertmanager and prometheus since reload fails
if services are not running.
Also added task to install gcc in RedHat family when installing from
source.
  • Loading branch information
abednarik committed Oct 11, 2016
1 parent bb29096 commit 25e75ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tasks/install-alertmanager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
template: src="../templates/alertmanager.sysvinit.{{ ansible_os_family|lower }}.sh.j2" dest="/etc/init.d/alertmanager" mode="a+x"

- name: set INIT status
service: name=alertmanager enabled=yes
service: name=alertmanager enabled=yes state=started

#- name: set INIT status and start
# service: name=alertmanager state=started
Expand Down
3 changes: 3 additions & 0 deletions tasks/install-compile-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
apt: name=build-essential state=present update_cache=yes
when: ansible_pkg_mgr == "apt"

- name: install gcc
yum: name=gcc state=present update_cache=yes
when: ansible_pkg_mgr == "yum"

- name: set internal variables for convenience
set_fact:
Expand Down
2 changes: 1 addition & 1 deletion tasks/install-prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
template: src="../templates/prometheus.sysvinit.{{ ansible_os_family|lower }}.sh.j2" dest="/etc/init.d/prometheus" mode="a+x"

- name: set INIT status
service: name=prometheus enabled=yes
service: name=prometheus enabled=yes state=started

- name: copy prometheus main config file from role's default, if necessary
template:
Expand Down

0 comments on commit 25e75ff

Please sign in to comment.