mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-22 21:23:23 +02:00
43 lines
1.8 KiB
YAML
43 lines
1.8 KiB
YAML
---
|
|
|
|
# Load distribution specific variables
|
|
- include_vars: "{{ item }}"
|
|
with_first_found:
|
|
- "{{ role_path }}/vars/{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
|
|
- "{{ role_path }}/vars/{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml"
|
|
- "{{ role_path }}/vars/{{ ansible_distribution }}.yml"
|
|
- "{{ role_path }}/vars/{{ ansible_os_family }}.yml"
|
|
tags: web
|
|
|
|
- name: List http ports
|
|
set_fact: nginx_ports={{ nginx_ports + (nginx_vhosts | selectattr('port','defined') | map(attribute='port') | list) | flatten | unique }}
|
|
tags: firewall,web,quickweb
|
|
|
|
- name: List https ports
|
|
set_fact: nginx_ssl_ports={{ nginx_ssl_ports + (nginx_vhosts | selectattr('ssl','defined') | selectattr('ssl.port','defined') | map(attribute='ssl.port') | list) | flatten | unique }}
|
|
tags: firewall,web,quickweb
|
|
|
|
- set_fact: nginx_cert_path={{ '/var/lib/dehydrated/certificates/certs/' + nginx_letsencrypt_cert + '/fullchain.pem' }}
|
|
when: nginx_letsencrypt_cert is defined
|
|
tags: web,conf,quickweb
|
|
- set_fact: nginx_key_path={{ '/var/lib/dehydrated/certificates/certs/' + nginx_letsencrypt_cert + '/privkey.pem' }}
|
|
when: nginx_letsencrypt_cert is defined
|
|
tags: web,conf,quickweb
|
|
|
|
- name: Merge vhosts settings with defaults
|
|
set_fact: nginx_vhosts_conf={{ nginx_vhosts_conf | default([]) + [ nginx_default_vhost | combine(item, recursive=True) ] }}
|
|
with_items: "{{ nginx_vhosts }}"
|
|
tags: web,conf,quickweb
|
|
- set_fact: nginx_vhosts={{ nginx_vhosts_conf | default([]) }}
|
|
tags: web,conf,quickweb
|
|
|
|
- name: Check if Lemonldap::NG is installed
|
|
stat: path=/etc/lemonldap-ng/lemonldap-ng.ini
|
|
register: nginx_llng
|
|
tags: web,quickweb
|
|
|
|
- name: Check if llng_header.inc conf is installed
|
|
stat: path=/etc/nginx/ansible_conf.d/llng_headers.inc
|
|
register: nginx_llng_headers
|
|
tags: web,quickweb
|