formatting

This commit is contained in:
uumas
2022-11-18 06:07:36 +02:00
parent d2313dbdf0
commit 5c5eff0370
12 changed files with 30 additions and 41 deletions

View File

@@ -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

View File

@@ -7,4 +7,3 @@ gen_locales:
lang: en_US.UTF-8
lc_messages: "{{ lang }}"
language: "en_US:en"

View File

@@ -17,4 +17,4 @@
template:
src: locale.j2
dest: "{{ locale_config }}"
mode: 0644

View File

@@ -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

View File

@@ -13,4 +13,3 @@
name: "{{ delete_packages }}"
state: absent
when: delete_packages is defined

View File

@@ -4,4 +4,3 @@
package:
name: "{{ install_packages }}"
state: present

View File

@@ -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

View File

@@ -2,4 +2,3 @@
reverse_proxy_type: caddy
web_server: "{{ reverse_proxy_type }}"

View File

@@ -12,4 +12,3 @@
PermitRootLogin: 'prohibit-password'
PasswordAuthentication: "{{ 'yes' if sshd_password_auth else 'no' }}"
X11Forwarding: "{{ 'yes' if sshd_x11_forwarding else 'no' }}"

View File

@@ -49,4 +49,3 @@ argument_specs:
choices:
- temporary
- permanent

View File

@@ -3,4 +3,3 @@
dependencies:
- role: caddy
when: web_server == 'caddy'

View File

@@ -22,4 +22,3 @@
validate: 'caddy validate --config %s --adapter caddyfile'
backup: true
notify: reload caddy