Ongoing effort to automate my server setup using ansible https://ccw.icu
Find a file
2025-01-14 17:22:24 +01:00
group_vars/all Made ssh port configurable 2023-12-30 14:10:58 +01:00
roles services/cgit: allow adding additional caddy rules 2025-01-14 17:22:24 +01:00
templates Updated caddy.yml template to only restart the service if needed 2023-07-09 07:32:55 +02:00
.gitignore containers/wireguard: new role 2023-07-22 20:42:04 +02:00
ansible.cfg fixed typo 2023-12-30 14:10:59 +01:00
LICENSE Added license 2023-06-12 20:18:20 +02:00
README.org Fixed problem, where ssh lockdown would lock the user out of the user 2023-07-23 14:31:30 +02:00
run.yml services/cgit: new role 2025-01-14 15:12:38 +01:00

ccw.icu infrastructure

Ansible Playbook I use to provision my Alpine Linux server

Requirements

  • ansible (ansible-core is not enough, as I'm using community packages)
  • ssh
  • py3-passlib (on Alpine Linux, because the crypt module will be deprecated from python 3.13 onward)

Because the system role will disable password-ssh-login, you should copy your ssh key to your new machine

ssh-copy-id root@<hostname/ip>

Running

As you might have noticed, from the .gitignore, this repo does not contain the secret.yml nor the hosts.yml, that is because they are meant to stay secret and you have to write your own.

For more information on the hosts.yml file, see the How to build your inventory ansible wiki.

To setup the secret store, run the following command: (and add the password: variable in there)

ansible-vault create group_vars/all/secret.yaml

After creating the password store, you can run the playbook

ansible-playbook run.yml -K --ask-vault-pass

To edit the password store at a later date, run the following command:

ansible-vault edit group_vars/all/secret.yml