blob: 616cb6a5628581fec2ddcacbf5ef99898b744de9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Infrastructure
## Using SSH
Add:
```
Include .../xn--ix-yja.es/infrastructure/ssh_config
```
to your `~/.ssh/config` before any `Host` statement.
## Bootstrapping
Ensure you can `ssh root@ñix.es`, and then:
```
uv run ansible-playbook -i ssh-root.yaml -i production.yaml site.yaml
```
You might need to `systemctl restart apache2` for the Let's Encrypt certificate.
## Running Ansible
After bootstrapping, you can run Ansible via ssh with your user and `sudo`.
After [setting your user password](roles/users/README.md):
```
uv run ansible-playbook -K -i production.yaml site.yaml
```
Or run from the same host with:
```
uv run ansible-playbook -K -i local-exec.yaml -i production.yaml site.yaml
```
## Roles
* The [users](roles/users) role to add new users
* The [git](roles/git) role to host Git repositories (https and Gitweb)
* The [vaultwarden](roles/vaultwarden) role for secret management
## Testing
With Incus installed, edit `local_incus.hosts.ñix.es.ansible_incus_project` in `incus-test-local.yaml` with your project from `incus project list`.
Then, you can use the following command to create a test VM on Incus and deploy:
```
uv run ansible-playbook -i production.yaml -i incus-test-local.yaml site.yaml
```
### Accessing
1. Obtain the VM IP address by running `incus list`.
1. Run `ssh -D 1080 $IP`.
1. Configure your browser to use a SOCKS v5 proxy on `localhost:1080` and to proxy DNS.
## Notes
### Contabo Debian 13
* `unattended-upgrades` configured by default
|