mirror of
https://github.com/Expand-sys/caddyconfigure
synced 2025-12-13 07:42:14 +11:00
No description
| caddyfile | ||
| vars | ||
| .gitignore | ||
| caddyinstall.ansible.yml | ||
| inventory | ||
| main.ansible.yml | ||
| README.md | ||
caddy configure
Configures caddy with ansible and reverts changes should there be an issue. ONLY COMPATIBLE WITH BINARY VERSION FOR NOW, DOCKER COMPAT WILL COME LATER
How to use
- install ansible on any linux machine or WSL install, it can even be the machine you are planning to install Caddy on. https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html
a.
dnf install -y ansiblefor rocky/alma/centos/fedora oryay -S ansiblefor arch based systems, anything else check link in above if your operating system is not listed install via python pip3 git clone https://github.com/Expand-sys/caddyconfigure && cd caddyconfigurecp caddyfile/Caddyfile.rename-me caddyfile/Caddyfile- edit ./inventory with your favourite text editor e.g.
nano ./inventoryto have the ip address of your target server, can be 127.0.0.1 or localhost if it is running on the same machine, by default it is 127.0.0.1 - edit vars/default.yml with your favourite text editor e.g.
nano vars/default.ymlif you already have an install of caddy(not docker) set install caddy to false, it wont harm anything to keep it set to true either way it will just update your caddy binary to the latest. and make sure if you want a custom location for your caddy file to change it here aswell. - run
ansible-playbook -i inventory main.ansible.yml -kThis script must be run as root user on the target machine so the-kwill ask for the ssh password for the root user OF THE TARGET SERVER if you have ssh keys set up for the root user you may omit the -k