formatting
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
- debian-keyring
|
||||
- debian-archive-keyring
|
||||
- apt-transport-https
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
|
||||
- name: Add caddy repo signing key
|
||||
apt_key:
|
||||
@@ -30,7 +30,7 @@
|
||||
marker_end: '# https://caddyserver.com/docs/caddyfile'
|
||||
state: absent
|
||||
validate: 'caddy validate --config %s --adapter caddyfile'
|
||||
backup: yes
|
||||
backup: true
|
||||
|
||||
- name: Put caddy general config in place
|
||||
blockinfile:
|
||||
@@ -41,5 +41,5 @@
|
||||
email {{ admin_email }}
|
||||
}
|
||||
validate: 'caddy validate --config %s --adapter caddyfile'
|
||||
backup: yes
|
||||
backup: true
|
||||
notify: reload caddy
|
||||
|
||||
@@ -7,4 +7,3 @@ gen_locales:
|
||||
lang: en_US.UTF-8
|
||||
lc_messages: "{{ lang }}"
|
||||
language: "en_US:en"
|
||||
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
template:
|
||||
src: locale.j2
|
||||
dest: "{{ locale_config }}"
|
||||
|
||||
mode: 0644
|
||||
|
||||
@@ -4,20 +4,17 @@
|
||||
apt:
|
||||
name: "{{ install_packages }}"
|
||||
state: present
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
|
||||
- block:
|
||||
- name: Enable backports
|
||||
apt_repository:
|
||||
repo: "deb http://deb.debian.org/debian {{ ansible_distribution_release }}-backports main"
|
||||
filename: backports
|
||||
|
||||
- name: Enable backports
|
||||
apt_repository:
|
||||
repo: "deb http://deb.debian.org/debian {{ ansible_distribution_release }}-backports main"
|
||||
filename: backports
|
||||
|
||||
- name: Install backports packages
|
||||
apt:
|
||||
name: "{{ backports_packages }}"
|
||||
state: present
|
||||
default_release: "{{ ansible_distribution_release }}-backports"
|
||||
|
||||
- name: Install backports packages
|
||||
apt:
|
||||
name: "{{ backports_packages }}"
|
||||
state: present
|
||||
default_release: "{{ ansible_distribution_release }}-backports"
|
||||
when: backports_packages is defined
|
||||
|
||||
|
||||
@@ -13,4 +13,3 @@
|
||||
name: "{{ delete_packages }}"
|
||||
state: absent
|
||||
when: delete_packages is defined
|
||||
|
||||
|
||||
@@ -4,4 +4,3 @@
|
||||
package:
|
||||
name: "{{ install_packages }}"
|
||||
state: present
|
||||
|
||||
|
||||
@@ -5,20 +5,21 @@
|
||||
msg: "uumas.general.reverse_proxy is deprecated. You should switch to uumas.general.vhost with vhost_type: reverse_proxy"
|
||||
|
||||
- block:
|
||||
- name: Split legacy proxy_target to protocol, host and port
|
||||
set_fact:
|
||||
proxy_target_split_protocol: "{{ proxy_target.split('://') }}"
|
||||
- set_fact:
|
||||
proxy_target_split_host: "{{ (proxy_target_split_protocol | last).split(':') }}"
|
||||
- set_fact:
|
||||
proxy_target_host: "{{ proxy_target_split_host[0] }}"
|
||||
proxy_target_port: "{{ proxy_target_split_host[1] }}"
|
||||
|
||||
- name: Set proxy_target_protocol based on proxy_target
|
||||
set_fact:
|
||||
proxy_target_protocol: "{{ proxy_target_split_protocol[0] }}"
|
||||
when: proxy_target_split_protocol | length == 2
|
||||
- name: Split legacy proxy_target to protocol and target
|
||||
set_fact:
|
||||
proxy_target_split_protocol: "{{ proxy_target.split('://') }}"
|
||||
- name: Split target further to host and port
|
||||
set_fact:
|
||||
proxy_target_split_host: "{{ (proxy_target_split_protocol | last).split(':') }}"
|
||||
- name: Set host and port variables
|
||||
set_fact:
|
||||
proxy_target_host: "{{ proxy_target_split_host[0] }}"
|
||||
proxy_target_port: "{{ proxy_target_split_host[1] }}"
|
||||
|
||||
- name: Set proxy_target_protocol based on proxy_target
|
||||
set_fact:
|
||||
proxy_target_protocol: "{{ proxy_target_split_protocol[0] }}"
|
||||
when: proxy_target_split_protocol | length == 2
|
||||
when: proxy_target is defined and proxy_target_port is not defined
|
||||
|
||||
- name: configure vhost for reverse proxy
|
||||
@@ -26,4 +27,3 @@
|
||||
name: vhost
|
||||
vars:
|
||||
vhost_type: reverse_proxy
|
||||
|
||||
|
||||
@@ -2,4 +2,3 @@
|
||||
|
||||
reverse_proxy_type: caddy
|
||||
web_server: "{{ reverse_proxy_type }}"
|
||||
|
||||
|
||||
@@ -12,4 +12,3 @@
|
||||
PermitRootLogin: 'prohibit-password'
|
||||
PasswordAuthentication: "{{ 'yes' if sshd_password_auth else 'no' }}"
|
||||
X11Forwarding: "{{ 'yes' if sshd_x11_forwarding else 'no' }}"
|
||||
|
||||
|
||||
@@ -49,4 +49,3 @@ argument_specs:
|
||||
choices:
|
||||
- temporary
|
||||
- permanent
|
||||
|
||||
|
||||
@@ -3,4 +3,3 @@
|
||||
dependencies:
|
||||
- role: caddy
|
||||
when: web_server == 'caddy'
|
||||
|
||||
|
||||
@@ -22,4 +22,3 @@
|
||||
validate: 'caddy validate --config %s --adapter caddyfile'
|
||||
backup: true
|
||||
notify: reload caddy
|
||||
|
||||
|
||||
Reference in New Issue
Block a user