2022-01-17 21:13:35 +00:00
|
|
|
---
|
|
|
|
- name: Install common role
|
|
|
|
hosts: "{{ variable_host }}"
|
2020-02-05 08:15:57 +00:00
|
|
|
become: yes
|
|
|
|
become_method: sudo
|
2022-01-17 21:13:35 +00:00
|
|
|
gather_facts: yes
|
|
|
|
roles:
|
|
|
|
- role: nginx_common
|
2020-02-05 08:15:57 +00:00
|
|
|
environment:
|
|
|
|
http_proxy: "{{PROXY}}"
|
|
|
|
https_proxy: "{{PROXY}}"
|
2020-04-07 18:16:12 +00:00
|
|
|
|
2022-01-17 21:13:35 +00:00
|
|
|
tags:
|
|
|
|
- system
|
|
|
|
- docker
|
2021-10-03 18:46:19 +00:00
|
|
|
|
2022-01-17 21:13:35 +00:00
|
|
|
- name: Install docker
|
2021-10-03 18:46:19 +00:00
|
|
|
hosts: "{{ variable_host }}"
|
2022-01-19 08:58:04 +00:00
|
|
|
become: yes
|
2021-10-03 18:46:19 +00:00
|
|
|
gather_facts: yes
|
|
|
|
roles:
|
|
|
|
- role: docker
|
|
|
|
environment:
|
|
|
|
http_proxy: "{{PROXY}}"
|
|
|
|
https_proxy: "{{PROXY}}"
|
2022-01-17 21:13:35 +00:00
|
|
|
- role: nginx_docker
|
|
|
|
environment:
|
|
|
|
http_proxy: "{{PROXY}}"
|
|
|
|
https_proxy: "{{PROXY}}"
|
2021-10-03 18:46:19 +00:00
|
|
|
tags:
|
|
|
|
- docker
|
2022-01-17 21:13:35 +00:00
|
|
|
|
|
|
|
- name: Install system role
|
|
|
|
hosts: "{{ variable_host }}"
|
2020-02-05 08:15:57 +00:00
|
|
|
become: yes
|
|
|
|
become_method: sudo
|
|
|
|
tasks:
|
2022-01-17 21:13:35 +00:00
|
|
|
- name: Add syn_flood tasks
|
|
|
|
include: haproxy/tasks/syn_flood.yml
|
|
|
|
when: (SYN_FLOOD is defined) and (SYN_FLOOD|length > 0)
|
2022-03-04 06:52:09 +00:00
|
|
|
- name: Install nginx for Centos Stream 9
|
|
|
|
package:
|
|
|
|
name: nginx
|
|
|
|
state: present
|
|
|
|
when: ansible_facts['distribution_major_version'] == '9'
|
|
|
|
tags:
|
|
|
|
- system
|
2020-02-05 08:15:57 +00:00
|
|
|
roles:
|
|
|
|
- role: nginxinc.nginx
|
|
|
|
environment:
|
|
|
|
http_proxy: "{{PROXY}}"
|
|
|
|
https_proxy: "{{PROXY}}"
|
2022-03-04 06:52:09 +00:00
|
|
|
when: ansible_facts['distribution_major_version'] != '9'
|
2021-10-03 18:46:19 +00:00
|
|
|
tags:
|
|
|
|
- system
|
2022-01-19 18:47:58 +00:00
|
|
|
|
|
|
|
- name: Set correct owner
|
|
|
|
hosts: "{{ variable_host }}"
|
|
|
|
become: yes
|
|
|
|
tasks:
|
|
|
|
- name: Set
|
|
|
|
shell: "chown nginx:nginx -R {{ nginx_dir }}"
|
|
|
|
|