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