Changelog: https://roxy-wi.org/changelog#6_3_3
pull/355/head
Pavel Loginov 2023-01-05 01:17:33 +03:00
parent 204fcd855a
commit f79a1afb1f
4 changed files with 51 additions and 21 deletions

View File

@ -159,6 +159,13 @@ def install_service(server_ip: str, service: str, docker: str, **kwargs) -> None
syn_flood_protect = '1' if form.getvalue('syn_flood') == "1" else ''
if service == 'apache':
correct_service_name = service_common.get_correct_apache_service_name(server_ip=server_ip)
if service_dir == '/etc/httpd' and correct_service_name == 'apache2':
service_dir = '/etc/apache2'
elif service_dir == '/etc/apache2' and correct_service_name == 'httpd':
service_dir = '/etc/httpd'
commands = [
f"chmod +x {script} && ./{script} PROXY={proxy_serv} STATS_USER={stats_user} STATS_PASS='{stats_password}' "
f"SSH_PORT={ssh_settings['port']} CONFIG_PATH={config_path} CONT_NAME={container_name} STAT_PORT={stats_port} "

View File

@ -39,7 +39,7 @@
become_method: sudo
tasks:
- name: Add syn_flood tasks
include: haproxy/tasks/syn_flood.yml
include_tasks: haproxy/tasks/syn_flood.yml
when: (SYN_FLOOD is defined) and (SYN_FLOOD|length > 0)
roles:
- role: apache
@ -48,3 +48,22 @@
https_proxy: "{{PROXY}}"
tags:
- system
- name: "Set {{ ansible_user }} owner to {{ service_dir }}"
hosts: "{{ variable_host }}"
become: yes
gather_facts: no
tasks:
- name: Set SSH port
set_fact:
ansible_port: "{{SSH_PORT}}"
- name: "Set {{ ansible_user }} owner to {{ service_dir }}"
file:
path: "{{ service_dir }}"
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
state: directory
recurse: yes
tags:
- system
- docker

View File

@ -39,7 +39,7 @@
become_method: sudo
tasks:
- name: Add syn_flood tasks
include: haproxy/tasks/syn_flood.yml
include_tasks: haproxy/tasks/syn_flood.yml
when: (SYN_FLOOD is defined) and (SYN_FLOOD|length > 0)
- name: Install nginx for Centos Stream 9
package:
@ -57,10 +57,14 @@
tags:
- system
- name: Set correct owner
- name: "Set {{ ansible_user }} owner to {{ service_dir }}"
hosts: "{{ variable_host }}"
become: yes
tasks:
- name: Set
shell: "chown {{ ansible_user }}:{{ ansible_user }} -R {{ service_dir }}"
file:
path: "{{ service_dir }}"
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
state: directory
recurse: yes