Automate light server

Co-authored-by: J <j@jsts.xyz>
This commit is contained in:
yuri 2022-11-17 23:30:52 +01:00
commit e74a50e873
No known key found for this signature in database
GPG key ID: E646779AC54AEC64
40 changed files with 401 additions and 10 deletions

View file

@ -0,0 +1,20 @@
---
argument_specs:
main:
options:
nginx__enable_https_redirect:
description: Redirect HTTP traffic to HTTPS
type: bool
required: false
nginx__configs:
description: Configuration files to add to /etc/nginx/conf.d/
type: list
elements: dict
required: false
options:
name:
description: Name of the config file without file extension
type: str
content:
description: Content of the config file
type: str

View file

@ -0,0 +1,16 @@
dependencies:
- role: distribution_check
vars:
distribution_check__supported_distributions:
- name: Debian
versions:
- "10"
- "11"
- role: add_apt_repository
vars:
add_apt_repository__https_repo: false
add_apt_repository__keyring_url: https://nginx.org/keys/nginx_signing.key
add_apt_repository__keyring_path: /usr/share/keyrings/nginx-archive-keyring.gpg
add_apt_repository__repo: deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg]
http://nginx.org/packages/{{ ansible_facts.distribution | lower }} {{ ansible_facts.lsb.codename }} nginx
add_apt_repository__filename: nginx.list