diff --git a/app/scripts/ansible/roles/haproxy/tasks/main.yml b/app/scripts/ansible/roles/haproxy/tasks/main.yml index 97f6a522..fab1afae 100644 --- a/app/scripts/ansible/roles/haproxy/tasks/main.yml +++ b/app/scripts/ansible/roles/haproxy/tasks/main.yml @@ -31,12 +31,27 @@ - socat state: present when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and HAPVER|length > 0 + ignore_errors: yes register: install_result environment: http_proxy: "{{PROXY}}" https_proxy: "{{PROXY}}" +- name: Try to install another HAProxy {{HAPVER}} on EL{{ansible_facts['distribution_major_version']}} + yum: + name: + - http://repo1.haproxy-wi.org/haproxy-{{HAPVER}}.el{{ansible_facts['distribution_major_version']}}.x86_64.rpm + - socat + state: present + register: install_result1 + when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and ("'timed out' in install_result.stderr") + ignore_errors: yes + environment: + http_proxy: "{{PROXY}}" + https_proxy: "{{PROXY}}" + + - name: set_fact from wi` set_fact: haproxy_from_wi: "yes" @@ -49,7 +64,7 @@ - haproxy - socat state: latest - when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and ("'FAILED' in install_result.stderr") + when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and ("'FAILED' in install_result1.stderr") environment: http_proxy: "{{PROXY}}" https_proxy: "{{PROXY}}"