diff --git a/tasks/install-alertmanager.yml b/tasks/install-alertmanager.yml index d082d91..1a638ea 100644 --- a/tasks/install-alertmanager.yml +++ b/tasks/install-alertmanager.yml @@ -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 diff --git a/tasks/install-compile-tools.yml b/tasks/install-compile-tools.yml index c1a6079..4964bd5 100644 --- a/tasks/install-compile-tools.yml +++ b/tasks/install-compile-tools.yml @@ -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: diff --git a/tasks/install-prometheus.yml b/tasks/install-prometheus.yml index 378807e..cf32038 100644 --- a/tasks/install-prometheus.yml +++ b/tasks/install-prometheus.yml @@ -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: