22 lines
1.1 KiB
YAML
22 lines
1.1 KiB
YAML
|
---
|
||
|
- name: Ensure container image is {{ alertmanager_state }} on host
|
||
|
community.docker.docker_image:
|
||
|
name: "{{ alertmanager_container_image_reference }}"
|
||
|
state: "{{ alertmanager_state }}"
|
||
|
source: "{{ alertmanager_container_image_source }}"
|
||
|
force_source: "{{ alertmanager_container_image_force_pull | bool }}"
|
||
|
|
||
|
- name: Ensure container '{{ alertmanager_container_name }}' is {{ alertmanager_container_state }}
|
||
|
community.docker.docker_container:
|
||
|
name: "{{ alertmanager_container_name }}"
|
||
|
image: "{{ alertmanager_container_image_reference }}"
|
||
|
env: "{{ alertmanager_container_env | default(omit) }}"
|
||
|
user: "{{ alertmanager_user_info.uid | default(alertmanager_user) }}"
|
||
|
ports: "{{ alertmanager_container_ports | default(omit) }}"
|
||
|
volumes: "{{ alertmanager_container_volumes | default(omit) }}"
|
||
|
networks: "{{ alertmanager_container_networks | default(omit) }}"
|
||
|
purge_networks: "{{ alertmanager_container_purge_networks | default(omit) }}"
|
||
|
etc_hosts: "{{ alertmanager_container_etc_hosts | default(omit) }}"
|
||
|
restart_policy: "{{ alertmanager_container_restart_policy }}"
|
||
|
state: "{{ alertmanager_container_state }}"
|