diff --git a/roles/caddy_server/README.md b/roles/caddy_server/README.md index 2515e42..296cd56 100644 --- a/roles/caddy_server/README.md +++ b/roles/caddy_server/README.md @@ -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 diff --git a/roles/caddy_server/molecule/caddyfile/molecule.yml b/roles/caddy_server/molecule/caddyfile/molecule.yml index 8b67489..8577a01 100644 --- a/roles/caddy_server/molecule/caddyfile/molecule.yml +++ b/roles/caddy_server/molecule/caddyfile/molecule.yml @@ -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: diff --git a/roles/caddy_server/molecule/caddyfile/prepare.yml b/roles/caddy_server/molecule/caddyfile/prepare.yml index 3c07f7b..50d9259 100644 --- a/roles/caddy_server/molecule/caddyfile/prepare.yml +++ b/roles/caddy_server/molecule/caddyfile/prepare.yml @@ -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 diff --git a/roles/caddy_server/molecule/default/molecule.yml b/roles/caddy_server/molecule/default/molecule.yml index 8b67489..762bd8a 100644 --- a/roles/caddy_server/molecule/default/molecule.yml +++ b/roles/caddy_server/molecule/default/molecule.yml @@ -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: diff --git a/roles/caddy_server/molecule/default/prepare.yml b/roles/caddy_server/molecule/default/prepare.yml index 3c07f7b..50d9259 100644 --- a/roles/caddy_server/molecule/default/prepare.yml +++ b/roles/caddy_server/molecule/default/prepare.yml @@ -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 diff --git a/roles/caddy_server/tasks/install_archlinux.yml b/roles/caddy_server/tasks/install_archlinux.yml new file mode 100644 index 0000000..07d0877 --- /dev/null +++ b/roles/caddy_server/tasks/install_archlinux.yml @@ -0,0 +1,6 @@ +--- +- name: Requirements and Caddy are installed + ansible.builtin.package: + name: + - python-requests + - caddy