42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
- name: install apache2
|
|
apt: name=apache2 update_cache=yes state=latest
|
|
|
|
- name: install libapache2-mod-auth-openidc
|
|
apt: name=libapache2-mod-auth-openidc state=latest
|
|
|
|
- name: apache2 listen on port {{ http_port }} and {{ https_port }}
|
|
lineinfile:
|
|
dest: /etc/apache2/ports.conf
|
|
regexp: "{{ item.regexp }}"
|
|
line: "{{ item.line }}"
|
|
state: present
|
|
with_items:
|
|
- { regexp: "^.*Listen {{ http_port }}", line: "Listen {{ http_port }}" }
|
|
- { regexp: "^.*Listen {{ https_port }}", line: "Listen {{ https_port }}" }
|
|
notify:
|
|
- restart apache2
|
|
|
|
- name: enabling modules
|
|
apache2_module:
|
|
name: "{{ item.name }}"
|
|
state: "{{ item.state }}"
|
|
with_items:
|
|
- { name: proxy_http , state: present }
|
|
- { name: rewrite , state: present }
|
|
- { name: macro , state: present }
|
|
- { name: auth_openidc , state: present }
|
|
- { name: ssl , state: present }
|
|
- { name: cgid , state: present }
|
|
- { name: proxy_wstunnel, state: present }
|
|
|
|
# - { name: ssl , state: absent }
|
|
notify:
|
|
- restart apache2
|
|
|
|
- name: apache running
|
|
service:
|
|
name: apache2
|
|
state: started
|
|
enabled: yes
|
|
|