Skip to content

Commit

Permalink
AWS deploy: prometheus restarts upon config updates
Browse files Browse the repository at this point in the history
  • Loading branch information
panchoh committed Mar 19, 2019
1 parent f16bab3 commit 9d98fcf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions deploy/aws/provision/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@
- vars.yml
tasks:
- include: tasks/prometheus/main.yml
handlers:
- name: Restart Prometheus
systemd:
name: prometheus
daemon_reload: yes
state: restarted
tags:
- prometheus

Expand Down
4 changes: 4 additions & 0 deletions deploy/aws/provision/tasks/prometheus/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,17 @@
dest: /etc/prometheus/prometheus.yml
src: ../../templates/prometheus-config.yml.j2
force: yes
notify:
- Restart Prometheus

- name: Install Prometheus systemd service unit file
template:
dest: /etc/systemd/system/{{ item }}
src: ../../templates/{{ item }}.j2
with_items:
- prometheus.service
notify:
- Restart Prometheus

- name: Enable and run Prometheus service
systemd:
Expand Down

0 comments on commit 9d98fcf

Please sign in to comment.