From 2941bd1415f4ece36ae46b64f6c42e868c987cc4 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Sat, 3 Mar 2018 17:20:33 +0000 Subject: [PATCH] Merge haproxy plays The two haproxy plays can be simplified into one, because they are targetting the same hosts, in the same kind of way (same serialization and environment) Change-Id: Ibebec0a97345632f95d02ea74d018065919dca29 --- playbooks/haproxy-install.yml | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/playbooks/haproxy-install.yml b/playbooks/haproxy-install.yml index 7a5180165e..a91ad1cac8 100644 --- a/playbooks/haproxy-install.yml +++ b/playbooks/haproxy-install.yml @@ -29,22 +29,6 @@ static: no when: - hostvars['localhost']['resolvconf_enabled'] | bool - roles: - - role: "keepalived" - when: haproxy_use_keepalived | bool - tags: - - keepalived - environment: "{{ deployment_environment_variables | default({}) }}" - tags: - - haproxy-config - - haproxy - -- name: Install haproxy - hosts: haproxy - serial: "50%" - gather_facts: "{{ osa_gather_facts | default(True) }}" - user: root - pre_tasks: - name: Remove legacy haproxy configuration files file: dest: "/etc/haproxy/conf.d/{{ item.name }}" @@ -65,6 +49,10 @@ tags: - haproxy-config # this tag is present because the task is ONLY a config task roles: + - role: "keepalived" + when: haproxy_use_keepalived | bool + tags: + - keepalived - role: "haproxy_server" haproxy_service_configs: "{{ haproxy_default_services + haproxy_extra_services|default([]) }}" - role: "rsyslog_client" @@ -77,4 +65,5 @@ - include: common-tasks/package-cache-proxy.yml environment: "{{ deployment_environment_variables | default({}) }}" tags: + - haproxy-config - haproxy