2022-01-17 21:13:35 +00:00
|
|
|
---
|
|
|
|
- name: Install common role
|
2023-12-16 07:15:59 +00:00
|
|
|
hosts: all
|
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:
|
2023-01-02 20:01:20 +00:00
|
|
|
- role: service_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
|
2023-12-16 07:15:59 +00:00
|
|
|
hosts: all
|
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}}"
|
2023-01-02 20:01:20 +00:00
|
|
|
- role: service_docker
|
2022-01-17 21:13:35 +00:00
|
|
|
environment:
|
|
|
|
http_proxy: "{{PROXY}}"
|
|
|
|
https_proxy: "{{PROXY}}"
|
2023-01-02 20:01:20 +00:00
|
|
|
vars:
|
|
|
|
image_name: nginx
|
|
|
|
cont_etc_dir: "/etc/nginx"
|
2021-10-03 18:46:19 +00:00
|
|
|
tags:
|
|
|
|
- docker
|
2022-01-17 21:13:35 +00:00
|
|
|
|
|
|
|
- name: Install system role
|
2023-12-16 07:15:59 +00:00
|
|
|
hosts: all
|
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
|
2023-01-04 22:17:33 +00:00
|
|
|
include_tasks: haproxy/tasks/syn_flood.yml
|
2022-01-17 21:13:35 +00:00
|
|
|
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
|
|
|
|
2023-01-04 22:17:33 +00:00
|
|
|
- name: "Set {{ ansible_user }} owner to {{ service_dir }}"
|
2023-12-16 07:15:59 +00:00
|
|
|
hosts: all
|
2022-01-19 18:47:58 +00:00
|
|
|
become: yes
|
2023-01-05 08:51:43 +00:00
|
|
|
gather_facts: no
|
2022-01-19 18:47:58 +00:00
|
|
|
tasks:
|
2023-01-05 08:51:43 +00:00
|
|
|
- name: "Set {{ ansible_user }} owner to {{ service_dir }}"
|
|
|
|
file:
|
|
|
|
path: "{{ service_dir }}"
|
|
|
|
owner: "{{ ansible_user }}"
|
|
|
|
group: "{{ ansible_user }}"
|
|
|
|
state: directory
|
2023-03-30 10:38:03 +00:00
|
|
|
recurse: true
|
|
|
|
mode: 0775
|
2023-01-05 08:51:43 +00:00
|
|
|
tags:
|
|
|
|
- system
|
|
|
|
- docker
|
|
|
|
|