mirror of https://github.com/Aidaho12/haproxy-wi
				
				
				
			
		
			
				
	
	
		
			67 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			YAML
		
	
	
			
		
		
	
	
			67 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			YAML
		
	
	
---
 | 
						|
- name: Install common role
 | 
						|
  hosts: "{{ variable_host }}"
 | 
						|
  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: "{{ variable_host }}"
 | 
						|
  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: nginx
 | 
						|
        cont_etc_dir: "/etc/nginx"
 | 
						|
  tags:
 | 
						|
    - docker
 | 
						|
 | 
						|
- name: Install system role
 | 
						|
  hosts: "{{ variable_host }}"
 | 
						|
  become: yes
 | 
						|
  become_method: sudo
 | 
						|
  tasks:
 | 
						|
  - name: Add syn_flood tasks
 | 
						|
    include: haproxy/tasks/syn_flood.yml
 | 
						|
    when: (SYN_FLOOD is defined) and (SYN_FLOOD|length > 0)
 | 
						|
  - name: Install nginx for Centos Stream 9
 | 
						|
    package:
 | 
						|
      name: nginx
 | 
						|
      state: present
 | 
						|
    when: ansible_facts['distribution_major_version'] == '9'
 | 
						|
    tags:
 | 
						|
      - system
 | 
						|
  roles:
 | 
						|
    - role: nginxinc.nginx
 | 
						|
      environment:
 | 
						|
        http_proxy: "{{PROXY}}"
 | 
						|
        https_proxy: "{{PROXY}}"
 | 
						|
      when: ansible_facts['distribution_major_version'] != '9'
 | 
						|
  tags:
 | 
						|
    - system
 | 
						|
 | 
						|
- name: Set correct owner
 | 
						|
  hosts: "{{ variable_host }}"
 | 
						|
  become: yes
 | 
						|
  tasks:
 | 
						|
    - name: Set
 | 
						|
      shell: "chown {{ ansible_user }}:{{ ansible_user }} -R {{ service_dir }}"
 | 
						|
 |