New default version: 3.0
This commit is contained in:
parent
500f83aab8
commit
e0f360794e
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
haproxy_latest_release: True
|
||||
haproxy_version: 2.8
|
||||
haproxy_version: 3.0
|
||||
haproxy_repo_key: 'http://haproxy.debian.net/bernat.debian.org.gpg'
|
||||
haproxy_debian_latest_repo: "deb http://haproxy.debian.net {{ ansible_lsb.codename }}-backports-{{ haproxy_version }} main"
|
||||
haproxy_ubuntu_latest_repo: "ppa:vbernat/haproxy-{{ haproxy_version }}"
|
||||
|
|
|
@ -2,32 +2,32 @@
|
|||
- name: Manage the composition of haproxy as a docker swarm service
|
||||
block:
|
||||
- name: Create the local haproxy configuration directory
|
||||
file: dest=/etc/haproxy state=directory mode='0755'
|
||||
ansible.builtin.file: dest=/etc/haproxy state=directory mode='0755'
|
||||
|
||||
- name: Create the local directory for the socket volume
|
||||
file: dest={{ haproxy_docker_socket_dir }} state=directory mode='0755'
|
||||
ansible.builtin.file: dest={{ haproxy_docker_socket_dir }} state=directory mode='0755'
|
||||
|
||||
- name: Install a bare haproxy configuration if there's none
|
||||
copy: src=haproxy-sample.cfg dest=/etc/haproxy/haproxy.cfg mode='0644' force=no
|
||||
ansible.builtin.copy: src=haproxy-sample.cfg dest=/etc/haproxy/haproxy.cfg mode='0644' force=no
|
||||
|
||||
tags: [ 'haproxy', 'docker_haproxy', 'docker_swarm', 'docker' ]
|
||||
|
||||
- name: Manage the composition of haproxy as a docker swarm service
|
||||
block:
|
||||
- name: Create the destination directory of the haproxy docker compose file
|
||||
file: dest={{ haproxy_docker_compose_dir }} state=directory mode='0755'
|
||||
ansible.builtin.file: dest={{ haproxy_docker_compose_dir }} state=directory mode='0755'
|
||||
|
||||
- name: Install the docker compose file
|
||||
template: src=haproxy-docker-stack.yml.j2 dest={{ haproxy_docker_compose_dir }}/docker-haproxy-stack.yml mode='0644'
|
||||
ansible.builtin.template: src=haproxy-docker-stack.yml.j2 dest={{ haproxy_docker_compose_dir }}/docker-haproxy-stack.yml mode='0644'
|
||||
|
||||
- name: Create the overlay network that will be joined by the proxied services
|
||||
docker_network:
|
||||
community.docker.docker_network:
|
||||
name: '{{ haproxy_docker_overlay_network }}'
|
||||
driver: overlay
|
||||
scope: swarm
|
||||
|
||||
- name: Run the docker compose file to start the service
|
||||
docker_stack:
|
||||
community.docker.docker_stack:
|
||||
name: haproxy
|
||||
state: present
|
||||
compose:
|
||||
|
|
Loading…
Reference in New Issue