Skip to content

Commit

Permalink
caddy_server: Add Support for Archlinux (#84)
Browse files Browse the repository at this point in the history
add support for ArchLinux
  • Loading branch information
maxhoesel authored Dec 15, 2022
1 parent 9626b9b commit 4deb8d3
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions roles/caddy_server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Alternatively, you can also configure caddy with a Caddyfile by passing it to th
- Ubuntu 18.04 LTS or newer
- Debian 10 or newer
- A CentOS 8-compatible distribution like RockyLinux or AlmaLinux. RockyLinux is used for testing
- ArchLinux (tested against the latest package versions)
- Supported architectures: Anything supported by upstream caddy should work
- This role requires root access. Make sure to run this role with `become: yes` or equivalent

Expand Down
9 changes: 9 additions & 0 deletions roles/caddy_server/molecule/caddyfile/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ platforms:
override_command: false
pre_build_image: true

- name: caddy-archlinux
groups:
- archlinux
image: "docker.io/carlodepieri/docker-archlinux-ansible"
systemd: always
override_command: false
pre_build_image: true


provisioner:
name: ansible
env:
Expand Down
7 changes: 7 additions & 0 deletions roles/caddy_server/molecule/caddyfile/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@
- name: Update apt cache
apt:
update_cache: yes

- hosts: archlinux
tasks:
- name: Upgrade system
community.general.pacman:
update_cache: yes
upgrade: yes
8 changes: 8 additions & 0 deletions roles/caddy_server/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ platforms:
override_command: false
pre_build_image: true

- name: caddy-archlinux
groups:
- archlinux
image: "docker.io/carlodepieri/docker-archlinux-ansible"
systemd: always
override_command: false
pre_build_image: true

provisioner:
name: ansible
env:
Expand Down
7 changes: 7 additions & 0 deletions roles/caddy_server/molecule/default/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@
- name: Update apt cache
apt:
update_cache: yes

- hosts: archlinux
tasks:
- name: Upgrade system
community.general.pacman:
update_cache: yes
upgrade: yes
6 changes: 6 additions & 0 deletions roles/caddy_server/tasks/install_archlinux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
- name: Requirements and Caddy are installed
ansible.builtin.package:
name:
- python-requests
- caddy

0 comments on commit 4deb8d3

Please sign in to comment.