deploy_haproxy/tasks/install_docker.yml

20 lines
997 B
YAML

---
# task/install_docker file for deploy_haproxy
- name: "Update container volume list"
ansible.builtin.set_fact:
deploy_haproxy_container_volume_map: "{{ deploy_haproxy_container_volume_map + deploy_haproxy_extra_container_volumes }}"
- name: "Include ednxzu.docker_systemd_service"
ansible.builtin.include_role:
name: ednxzu.docker_systemd_service
vars:
docker_systemd_service_container_name: "haproxy"
docker_systemd_service_image: "{{ deploy_haproxy_docker_image }}:{{ deploy_haproxy_version }}"
docker_systemd_service_container_env: "{{ deploy_haproxy_env_variables }}"
docker_systemd_service_flags:
- network: host
- volume: "{{ deploy_haproxy_container_volume_map }}"
docker_systemd_service_name: "{{ docker_systemd_service_container_name }}_container"
docker_systemd_service_state: "{{ 'started' if deploy_haproxy_start_service else 'stopped'}}"
docker_systemd_service_restart: "{{ true if deploy_haproxy_start_service else false}}"