Pavel Loginov 3 years ago
parent 5cefd704fb
commit 2e4a1d7389

@ -858,8 +858,41 @@ def update_db_v_5_3_2_2(**kwargs):
print("Updating... DB has been updated to version 5.3.2")
def update_db_v_5_4_0(**kwargs):
query = Setting.update(value='/etc/nginx/').where(Setting.param == 'nginx_dir')
try:
query.execute()
except Exception as e:
print("An error occurred:", e)
else:
if kwargs.get('silent') != 1:
print("Updating... DB has been updated to version 5.4.0")
def update_db_v_5_4_01(**kwargs):
query = Setting.update(value='/etc/nginx/nginx.conf').where(Setting.param == 'nginx_config_path')
try:
query.execute()
except Exception as e:
print("An error occurred:", e)
else:
if kwargs.get('silent') != 1:
print("Updating... DB has been updated to version 5.4.0-1")
def update_db_v_5_4_02(**kwargs):
query = Setting.update(value='/var/log/haproxy/access.log').where(Setting.param == 'haproxy_path_logs')
try:
query.execute()
except Exception as e:
print("An error occurred:", e)
else:
if kwargs.get('silent') != 1:
print("Updating... DB has been updated to version 5.4.0-2")
def update_ver():
query = Version.update(version='5.3.6.0')
query = Version.update(version='5.4.0.0')
try:
query.execute()
except:
@ -895,6 +928,9 @@ def update_all():
update_db_v_5_3_1()
update_db_v_5_3_2()
update_db_v_5_3_2_2()
update_db_v_5_4_0()
update_db_v_5_4_01()
update_db_v_5_4_02()
update_ver()
@ -927,6 +963,9 @@ def update_all_silent():
update_db_v_5_3_1(silent=1)
update_db_v_5_3_2(silent=1)
update_db_v_5_3_2_2(silent=1)
update_db_v_5_4_0(silent=1)
update_db_v_5_4_01(silent=1)
update_db_v_5_4_02(silent=1)
update_ver()

@ -50,10 +50,10 @@
https_proxy: "{{PROXY}}"
- name: Copy Nginx configuration in place.
- name: Copy Nginx configuration in place
template:
src: /var/www/haproxy-wi/app/scripts/ansible/roles/default.conf.j2
dest: "{{CONFIG_PATH}}"
src: default.conf.j2
dest: "{{nginx_dir}}/conf.d"
mode: 0644
force: no
when: "'nginx' not in ansible_facts.packages"

Loading…
Cancel
Save