Skip to content

Commit 9f79538

Browse files
committed
feat: add widelands role
1 parent 239478b commit 9f79538

File tree

7 files changed

+62
-26
lines changed

7 files changed

+62
-26
lines changed

README.md

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,32 @@ This Ansible collection provides a set of roles designed for configuring Kubuntu
66

77
### Roles
88

9-
| Role | Description | Dependencies |
10-
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------ |
11-
| [xebis.ansible.apt](roles/apt/README.md) | Deb package updates and upgrades using the apt package manager. Can optionally clean up unused packages and reboot the system if required. | `xebis.ansible.system` |
12-
| `xebis.ansible.ansible` | Ansible direnv | `xebis.ansible.apt` |
13-
| [`xebis.ansible.coding_projects`](roles/coding_projects/README.md) | Creates and clones coding projects to `~/Projects` | `xebis.ansible.apt` |
14-
| `xebis.ansible.direnv` | direnv and Bash config for direnv | `xebis.ansible.apt` |
15-
| `xebis.ansible.docker` | Docker direnv | `xebis.ansible.apt`, `xebis.ansible.nftables_firewall` |
16-
| [xebis.ansible.grub](roles/grub/README.md) | GRUB menu configuration. | |
17-
| `xebis.ansible.fail2ban` | Fail2ban IPS | `xebis.ansible.apt` |
18-
| `xebis.ansible.flatpak` | Flatpak | `xebis.ansible.apt` |
19-
| `xebis.ansible.google_chrome` | Google Chrome (Stable) | `xebis.ansible.apt` |
20-
| `xebis.ansible.htop` | htop | `xebis.ansible.apt` |
21-
| `xebis.ansible.kde` | KDE firewall and utilities | `xebis.ansible.apt`, `xebis.ansible.nftables_firewall` |
22-
| `xebis.ansible.mc` | Midnight Commander | `xebis.ansible.apt` |
23-
| [xebis.ansible.nftables_firewall](roles/nftables_firewall/README.md) | nftables firewall | `xebis.ansible.apt` |
24-
| `xebis.ansible.obsidian` | Obsidian | `xebis.ansible.snapd` |
25-
| `xebis.ansible.openssh_client` | Installs OpenSSH client and generates SSH key pair. | `xebis.ansible.apt` |
26-
| `xebis.ansible.openssh_server` | Installs OpenSSH server and provides `Restart ssh` handler. | `xebis.ansible.apt` |
27-
| `xebis.ansible.snapd` | Snap daemon | `xebis.ansible.apt` |
28-
| [xebis.ansible.system](roles/system/README.md) | System-related tasks such as reboot handler or reboot when required handler. | |
29-
| `xebis.ansible.terraform` | Terraform | |
30-
| [xebis.ansible.tmpfs](roles/tmpfs/README.md) | Sets to mount directories as tmpfs during startup. | `xebis.ansible.system` |
31-
| [`xebis.ansible.users`](roles/users/README.md) | Ansible role for managing system users. | `xebis.ansible.openssh_server` |
32-
| [`xebis.ansible.visual_studio_code`](roles/visual_studio_code/README.md) | Microsoft Visual Studio Code (Stable) | `xebis.ansible.apt` |
33-
| `xebis.ansible.yq` | yq | `xebis.ansible.apt` |
9+
| Role | Description | Dependencies |
10+
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------- |
11+
| [xebis.ansible.apt](roles/apt/README.md) | Deb package updates and upgrades using the apt package manager. Can optionally clean up unused packages and reboot the system if required. | `xebis.ansible.system` |
12+
| `xebis.ansible.ansible` | Ansible direnv | `xebis.ansible.apt` |
13+
| [`xebis.ansible.coding_projects`](roles/coding_projects/README.md) | Creates and clones coding projects to `~/Projects` | `xebis.ansible.apt` |
14+
| `xebis.ansible.direnv` | direnv and Bash config for direnv | `xebis.ansible.apt` |
15+
| `xebis.ansible.docker` | Docker direnv | `xebis.ansible.apt`, `xebis.ansible.nftables_firewall` |
16+
| [xebis.ansible.grub](roles/grub/README.md) | GRUB menu configuration. | |
17+
| `xebis.ansible.fail2ban` | Fail2ban IPS | `xebis.ansible.apt` |
18+
| `xebis.ansible.flatpak` | Flatpak | `xebis.ansible.apt` |
19+
| `xebis.ansible.google_chrome` | Google Chrome (Stable) | `xebis.ansible.apt` |
20+
| `xebis.ansible.htop` | htop | `xebis.ansible.apt` |
21+
| `xebis.ansible.kde` | KDE firewall and utilities | `xebis.ansible.apt`, `xebis.ansible.nftables_firewall` |
22+
| `xebis.ansible.mc` | Midnight Commander | `xebis.ansible.apt` |
23+
| [xebis.ansible.nftables_firewall](roles/nftables_firewall/README.md) | nftables firewall | `xebis.ansible.apt` |
24+
| `xebis.ansible.obsidian` | Obsidian | `xebis.ansible.snapd` |
25+
| `xebis.ansible.openssh_client` | Installs OpenSSH client and generates SSH key pair. | `xebis.ansible.apt` |
26+
| `xebis.ansible.openssh_server` | Installs OpenSSH server and provides `Restart ssh` handler. | `xebis.ansible.apt` |
27+
| `xebis.ansible.snapd` | Snap daemon | `xebis.ansible.apt` |
28+
| [xebis.ansible.system](roles/system/README.md) | System-related tasks such as reboot handler or reboot when required handler. | |
29+
| `xebis.ansible.terraform` | Terraform | |
30+
| [xebis.ansible.tmpfs](roles/tmpfs/README.md) | Sets to mount directories as tmpfs during startup. | `xebis.ansible.system` |
31+
| [`xebis.ansible.users`](roles/users/README.md) | Ansible role for managing system users. | `xebis.ansible.openssh_server` |
32+
| [`xebis.ansible.visual_studio_code`](roles/visual_studio_code/README.md) | Microsoft Visual Studio Code (Stable) | `xebis.ansible.apt` |
33+
| `xebis.ansible.widelands` | Widelands | `xebis.ansible.flatpak`, `xebis.ansible.nftables_firewall` |
34+
| `xebis.ansible.yq` | yq | `xebis.ansible.apt` |
3435

3536
## Installation and Configuration
3637

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
udp dport 7396 counter accept # Widelands multiplayer
2+
tcp dport 7396
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
tcp dport 7388 counter accept # Widelands add-on server
2+
udp dport 7396 counter accept # Widelands multiplayer
3+
tcp dport 7396

roles/widelands/meta/main.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
dependencies:
3+
- role: xebis.ansible.flatpak # Expects installed flatpak
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
- name: Copy Widelands firewall rules
3+
become: true
4+
ansible.builtin.copy:
5+
src: "{{ item }}"
6+
dest: /etc/nftables/{{ item }}
7+
mode: u=rw,g=r,o=r
8+
with_items:
9+
- inet-in-widelands.conf
10+
- inet-out-widelands.conf
11+
notify: Validate and reload nftables firewall

roles/widelands/tasks/main.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
- name: Import firewall tasks
3+
ansible.builtin.import_tasks: firewall.yaml
4+
5+
- name: Add Flatpak remote repository
6+
community.general.flatpak_remote:
7+
name: flathub
8+
flatpakrepo_url: https://flathub.org/repo/flathub.flatpakrepo
9+
method: user
10+
state: present
11+
12+
- name: Install Widelands flatpak package
13+
community.general.flatpak:
14+
name: org.widelands.Widelands
15+
method: user
16+
state: present

test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@
6262
- HashiCorp.terraform
6363
- mkhl.direnv
6464
- oderwat.indent-rainbow
65-
- role: xebis.ansible.flatpak
65+
- role: xebis.ansible.widelands

0 commit comments

Comments
 (0)