Skip to content

Commit

Permalink
Don't run prometheus container pull in image build to avoid /tmp/podm…
Browse files Browse the repository at this point in the history
…an-run-1001/libpod/tmp/pause.pid existing in image, causing podman startup failure
  • Loading branch information
sjpb committed Jan 5, 2024
1 parent 7425a7f commit 55370e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions ansible/roles/prometheus/tasks/install.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
---

- name: Pull image for Prometheus
containers.podman.podman_image:
name: "{{ prometheus_container_image }}:{{ prometheus_version }}"
become: yes
become_user: podman

- name: Install systemd unit for Prometheus
include_role:
name: podman
Expand Down
6 changes: 6 additions & 0 deletions ansible/roles/prometheus/tasks/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@
with_dict: "{{ prometheus_targets }}"
when: prometheus_targets != {}

- name: Pull image for Prometheus
containers.podman.podman_image:
name: "{{ prometheus_container_image }}:{{ prometheus_version }}"
become_user: podman
notify: Restart Prometheus

- meta: flush_handlers # handles restarts due to config changes

- name: Ensure Prometheus service state
Expand Down

0 comments on commit 55370e4

Please sign in to comment.