[GIT] refactor submodules: add all to own repo

This commit is contained in:
Jannik Beyerstedt 2019-10-06 22:55:56 +02:00
commit be2b9bf3c0
27 changed files with 3311 additions and 0 deletions

43
tasks/caddy-install.yml Normal file
View file

@ -0,0 +1,43 @@
---
# Server/Caddyserver-Install: Install/Update Caddy Webserver (with some modules)
- name: caddyserver - Stop caddy
become: yes
service:
name: caddy
state: stopped
- name: caddyserver - Make temp download directory
file:
path: /tmp/caddy
state: directory
- name: caddyserver - Download caddy webserver
get_url:
url: https://caddyserver.com/download/linux/amd64?plugins=http.ratelimit&license=personal
dest: /tmp/caddy/caddy.tar.gz
- name: caddyserver - Extract caddy
shell: "cd /tmp/caddy && tar -xvf caddy.tar.gz"
# unarchive:
# src: /tmp/caddy/caddy.tar.gz
# dest: /tmp/caddy
# copy: no
- name: caddyserver - Copy caddy to a PATH location
become: yes
shell: "cp /tmp/caddy/caddy /usr/local/bin"
- name: caddyserver - Clean up download files
become: yes
file:
path: /tmp/caddy
state: absent
- name: caddyserver - Install caddy APT dependencies
become: yes
apt:
name: libcap2-bin
state: latest
- name: caddyserver - Give caddy port binding capabilities
become: yes
shell: "setcap cap_net_bind_service=+ep /usr/local/bin/caddy"
# capabilities:
# path: "{{ caddy_bin }}"
# capability: cap_net_bind_service+ep
# state: present