mirror of https://github.com/Aidaho12/haproxy-wi
v8.0: Comment out duplicate HAProxy installation task
Disabled a redundant HAProxy installation section in the Ansible playbook by commenting it out. Also removed the unnecessary `distro` library import and standardized the Python interpreter path in the service installation module for cleanup and consistency.pull/399/head
parent
a7a8b4b10d
commit
a1ed81b0a2
|
@ -3,7 +3,6 @@ import json
|
|||
from typing import Union
|
||||
from packaging import version
|
||||
|
||||
import distro
|
||||
import ansible
|
||||
import ansible_runner
|
||||
|
||||
|
@ -212,7 +211,6 @@ def run_ansible(inv: dict, server_ips: list, ansible_role: str) -> dict:
|
|||
proxy = sql.get_setting('proxy')
|
||||
proxy_serv = ''
|
||||
tags = ''
|
||||
python_int = '/usr/bin/python3' if distro.id() == 'ubuntu' else '/usr/bin/python3.11'
|
||||
|
||||
try:
|
||||
agent_pid = server_mod.start_ssh_agent()
|
||||
|
@ -263,7 +261,7 @@ def run_ansible(inv: dict, server_ips: list, ansible_role: str) -> dict:
|
|||
'AWX_DISPLAY': False,
|
||||
'SSH_AUTH_PID': agent_pid['pid'],
|
||||
'SSH_AUTH_SOCK': agent_pid['socket'],
|
||||
'ANSIBLE_PYTHON_INTERPRETER': python_int
|
||||
'ANSIBLE_PYTHON_INTERPRETER': '/usr/bin/python3'
|
||||
}
|
||||
kwargs = {
|
||||
'private_data_dir': '/var/www/haproxy-wi/app/scripts/ansible/',
|
||||
|
|
|
@ -37,23 +37,23 @@
|
|||
http_proxy: "{{PROXY}}"
|
||||
https_proxy: "{{PROXY}}"
|
||||
|
||||
- name: Try to install another HAProxy {{HAPVER}} on {{distr_short_name}}{{ansible_facts['distribution_major_version']}}
|
||||
yum:
|
||||
name:
|
||||
- http://repo1.roxy-wi.org/haproxy/haproxy-{{HAPVER}}.{{distr_short_name}}{{ansible_facts['distribution_major_version']}}.x86_64.rpm
|
||||
- socat
|
||||
- rsyslog
|
||||
- bind-utils
|
||||
state: present
|
||||
when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and ("'timed out' in install_result.stderr")
|
||||
ignore_errors: yes
|
||||
register: install_result1
|
||||
retries: 3
|
||||
until: install_result1.rc == 0
|
||||
delay: 3
|
||||
environment:
|
||||
http_proxy: "{{PROXY}}"
|
||||
https_proxy: "{{PROXY}}"
|
||||
#- name: Try to install another HAProxy {{HAPVER}} on {{distr_short_name}}{{ansible_facts['distribution_major_version']}}
|
||||
# yum:
|
||||
# name:
|
||||
# - http://repo1.roxy-wi.org/haproxy/haproxy-{{HAPVER}}.{{distr_short_name}}{{ansible_facts['distribution_major_version']}}.x86_64.rpm
|
||||
# - socat
|
||||
# - rsyslog
|
||||
# - bind-utils
|
||||
# state: present
|
||||
# when: (ansible_facts['os_family'] == "RedHat" or ansible_facts['os_family'] == 'CentOS') and ("'timed out' in install_result.stderr")
|
||||
# ignore_errors: yes
|
||||
# register: install_result1
|
||||
# retries: 3
|
||||
# until: install_result1.rc == 0
|
||||
# delay: 3
|
||||
# environment:
|
||||
# http_proxy: "{{PROXY}}"
|
||||
# https_proxy: "{{PROXY}}"
|
||||
|
||||
|
||||
- name: set_fact from wi
|
||||
|
|
Loading…
Reference in New Issue