Commit graph

134 commits

Author SHA1 Message Date
ab5c374990
fix(wg): correct check for existing private key
Registering output of ‹ansible.builtin.stat› generates an object
containing ‹stat› member itself.

Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-22 20:36:04 +01:00
4960068555
fix(wg): correctly template facts
When setting facts to outputs of some other tasks or variables, they need
to be correctly templated and quoted, otherwise they're taken as is,
i.e., as text.

Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-22 20:35:23 +01:00
da9662533a
fix(editor_vscode): use the packaged version of VSCode
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-22 20:34:52 +01:00
ab83e7c30c
fix(base_system): correctly check for the dnf
‹dnf5› presents itself as ‹dnf5›

Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-22 20:34:21 +01:00
7d8d187e97
feat(cockpit): allow 2FA auth
Fixes #60

Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-14 20:53:24 +01:00
f5335e0f0c
fix(editor_helix): remove Copr
Helix is included in the default repositories (Fedora and EPEL for EL
derivates), therefore there is no need to use the Copr repository.

Signed-off-by: Matej Focko <me@mfocko.xyz>

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch main
# Your branch is ahead of 'origin/main' by 3 commits.
#   (use "git push" to publish your local commits)
#
# Changes to be committed:
#	modified:   roles/editor_helix/tasks/install_fedora-family.yml
#
# Changes not staged for commit:
#	modified:   group_vars/servers/vars
#	modified:   inventory
#	modified:   playbooks/playground.yml
#	modified:   roles/cockpit/defaults/main.yml
#	modified:   roles/cockpit/tasks/install.yml
#	modified:   roles/cockpit/tasks/main.yml
#
# Untracked files:
#	ansible-navigator.log
#	playbooks/print_facts.yml
#	tasks/
#
2024-12-14 20:37:52 +01:00
4ca89d7641
fix(base_system): improve the system-wide upgrade
When upgrading packages to their latest version, decide which Ansible
module to use based on the ‹pkg_mgr› Ansible fact instead of the
distribution.

This approach is more robust, and more correct, as the package managers
are shared between some of the distributions.

Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-14 20:35:25 +01:00
a79bfb5551
fix(ssh_server): use correctly named variable
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-14 20:33:04 +01:00
fb94b38a57
feat: add Rocky to possible targets
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-14 14:31:39 +01:00
fa5339e1c1
chore: rename ‹secrets› group of roles
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-12 16:53:02 +01:00
cbbbe22173
chore: rename ‹shell› group of roles
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-12 16:51:53 +01:00
93de8c2ede
chore: rename ‹terminal› group of roles
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-12 16:50:02 +01:00
0135bcd48f
chore: rename ‹ssh› group of roles
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-12 16:10:22 +01:00
f8adf14aff
chore: rename ‹yubikey› group of roles
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-12 16:09:16 +01:00
0663aa96ce
chore: rename ‹os› group of roles
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-12 16:09:15 +01:00
4869b006ec
chore: rename ‹lang› group of roles
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-12 16:08:55 +01:00
a11b009120
chore: rename ‹editor› group of roles
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-12 16:08:45 +01:00
8e8c31c1f1
chore: rename ‹base› group of roles
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-12-12 16:07:41 +01:00
f40dd9b38b
fix(zsh): add Zig to the ‹$PATH›
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-28 09:41:18 +01:00
f49b40428c
fix(zsh): fix RH functions
As the previous way of connecting to the VPN and obtaining Kerberos
ticket is not safe (keeping both password and TOTP together), it has not
been used for a long time.

Refactor the aliases to allow for safer, yet somewhat automated way of
connecting and obtaining Kerberos ticket.

Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-28 09:40:01 +01:00
6ae61103c4
fix(zsh): keep both installation options for Rust
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-28 09:39:43 +01:00
6fe8c6196e
fix(zsh): switch default editor to Helix
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-28 09:39:13 +01:00
737acfde87
fix: require postgresql for forgejo and vaultwarden
Storing data for Forgejo and Vaultwarden in the postgres database results
in a rather wonky behavior during restarts of the VPS and potential
restarts of the postgres itself.

Based on some observations Forgejo is capable of recovering from such
issues, but Vaultwarden falls into a retry loop trying to reconnect to
the database while failing on resolving the hostname / connecting, e.g.,

    [2024-11-27 16:52:43.646][r2d2][ERROR] connection to server at "host.containers.internal" (XXX.XXX.XXX.XXX), port 5432 failed: Connection refused

Therefore adjust the quadlet definitions to require and boot containers
»after« the postgres is running to minimalize the possible issues.

Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-27 17:57:35 +01:00
da56e3acd6
fix(nginx): unnest notify
notify should not be passed to the module

Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-22 16:43:15 +01:00
b819a3d33e
fix(helix): define installation on Debian
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-20 18:14:40 +01:00
b49b5a3e91
fix(wg): improve generation of keypairs
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-20 18:13:02 +01:00
037716df0c
feat(quadlets): allow auto-update by podman
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-18 15:48:02 +01:00
69db34f4ff
fix(vaultwarden): handle reverse proxy
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-18 15:47:36 +01:00
4fa3f26d43
fix(thelounge): handle reverse proxy
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-18 15:35:55 +01:00
e0f3fbe22b
fix(forgejo): handle reverse proxy
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-18 15:31:15 +01:00
1f4c009197
fix(nginx): restart nginx on any changes
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-18 15:23:27 +01:00
e3bff6c8c4
fix(install): refine the decision-making for OSs
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-18 15:15:49 +01:00
c5747f422a
fix(base/system): upgrade with apt on Debian
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-18 15:09:53 +01:00
d0fc1cd3d6
style: add Ansible-managed headers
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-15 16:50:11 +01:00
02b44273db
fix(vaultwarden): bump ROCKET_WORKERS
This variable was not required when running from the user-space, but
after migrating to quadlets, I had to define it.

Just to satisfy the requirements, I set it to 1. Based on some docs I
have managed to find, it appears that the default is 10. Given the
amount of users of my deployment and the fact it's running on the VPS,
setting it to 8.

Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-14 17:52:36 +01:00
e106973211
feat(vaultwarden): deploy from quadlet
Related to #51

Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-14 16:50:43 +01:00
cde2c78a0e
feat(thelounge): add quadlet deployment
Related to #51

Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-14 15:56:22 +01:00
5057b9fed1
feat(forgejo): add quadlet deployment
Related to #51

Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-14 15:40:40 +01:00
8454780c92
feat(porkbun): switch to global variables for keys
- Introduce 2 global variables with API keys
- Remove redundant role that only installs one config file used by
  another role
- Use the said global variables within DDNS and Certbot roles
- Create the config file in the role that uses it (Certbot)

Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-12 16:46:34 +01:00
2039bf6570
feat(ddns): support Porkbun in the DDNS
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-12 16:40:16 +01:00
f6428b2406
fix(certbot): migrate from Cloudflare to Porkbun
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-12 16:40:14 +01:00
45a41d7c99
feat(porkbun): add support for porkbun creds
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-11-11 17:00:42 +01:00
27fe69cfa0
fix(os/el): enable Google repo and RPMfusion
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-07-30 15:11:16 +02:00
67d4083b97
feat(ptyxis): add new role for a terminal
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-07-30 15:08:54 +02:00
1d65e7e176
feat(sshd): adjust for archLinux
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-07-22 11:36:40 +02:00
9d89a874ec
fix(firewalld): adjust firewall only when it's set up
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-07-22 10:39:21 +02:00
eaaf707b60
fix(vscode)!: do not install
Always fails right now

Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-07-22 10:37:20 +02:00
f59e074ef8
fix(zsh): use correct *box script for name
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-07-22 10:37:16 +02:00
044d0e42ab
fix(helix): correct the installation
* Do not use Copr repo for AlmaLinux
* Make a generic install action for Helix from official repositories

Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-07-22 10:36:56 +02:00
ca89c810cd
fix(flatpak): install flatpak if not present
Signed-off-by: Matej Focko <me@mfocko.xyz>
2024-07-15 19:42:30 +02:00