haproxy-wi/app/scripts/ansible/roles/apache.yml

67 lines
1.4 KiB
YAML

---
- name: Install common role
hosts: all
become: yes
become_method: sudo
gather_facts: yes
roles:
- role: service_common
environment:
http_proxy: "{{PROXY}}"
https_proxy: "{{PROXY}}"
tags:
- system
- docker
- name: Install docker
hosts: all
become: yes
gather_facts: yes
roles:
- role: docker
environment:
http_proxy: "{{PROXY}}"
https_proxy: "{{PROXY}}"
- role: service_docker
environment:
http_proxy: "{{PROXY}}"
https_proxy: "{{PROXY}}"
vars:
image_name: httpd
cont_etc_dir: "/usr/local/apache2"
tags:
- docker
- name: Install system role
hosts: all
become: yes
become_method: sudo
tasks:
- name: Add syn_flood tasks
include_tasks: haproxy/tasks/syn_flood.yml
when: (SYN_FLOOD is defined) and (SYN_FLOOD|length > 0)
roles:
- role: apache
environment:
http_proxy: "{{PROXY}}"
https_proxy: "{{PROXY}}"
tags:
- system
- name: "Set {{ ansible_user }} owner to {{ service_dir }}"
hosts: all
become: yes
gather_facts: no
tasks:
- 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