diff --git a/roles/gitea/tasks/main.yml b/roles/gitea/tasks/main.yml index 623fe93..29b5638 100644 --- a/roles/gitea/tasks/main.yml +++ b/roles/gitea/tasks/main.yml @@ -1,4 +1,10 @@ --- +- name: Create Gitea directory + ansible.builtin.file: + path: /opt/apps/gitea + state: directory + mode: '0755' + - name: Deploy Gitea containers.podman.podman_container: image: docker.gitea.com/gitea:nightly diff --git a/roles/jellyfin/tasks/main.yml b/roles/jellyfin/tasks/main.yml index e198c87..ada64fe 100644 --- a/roles/jellyfin/tasks/main.yml +++ b/roles/jellyfin/tasks/main.yml @@ -1,4 +1,14 @@ --- +- name: Create Jellyfin directories + ansible.builtin.file: + path: "{{ item.path }}" + state: directory + mode: "{{ item.mode }}" + loop: + - { path: /opt/apps/jellyfin/config, mode: '0755' } + - { path: /opt/apps/jellyfin/tvseries, mode: '0777' } + - { path: /opt/apps/jellyfin/movies, mode: '0777' } + - name: Deploy Jellyfin containers.podman.podman_container: image: lscr.io/linuxserver/jellyfin:latest diff --git a/roles/minecraft/tasks/main.yml b/roles/minecraft/tasks/main.yml index fbbb0c6..06e4e2c 100644 --- a/roles/minecraft/tasks/main.yml +++ b/roles/minecraft/tasks/main.yml @@ -4,22 +4,17 @@ # External prerequisites (NOT managed by this repo): # - Cloudflare A record mc.boxswapper.io -> public IP (grey-cloud, like vpn.boxswapper.io) # - Router port forwards: TCP 25565 + UDP 19132 -> 10.10.0.45 +- name: Create Minecraft data directory + ansible.builtin.file: + path: /opt/apps/minecraft/data + state: directory + mode: '0755' + - name: Deploy Minecraft Server containers.podman.podman_container: image: docker.io/itzg/minecraft-server:latest name: minecraft - env: - EULA: "TRUE" - TYPE: PAPER - VERSION: "{{ minecraft_version }}" - MEMORY: "{{ minecraft_memory }}" - MOTD: "{{ minecraft_motd }}" - DIFFICULTY: "{{ minecraft_difficulty }}" - GAMEMODE: "{{ minecraft_gamemode }}" - MAX_PLAYERS: "{{ minecraft_max_players }}" - VIEW_DISTANCE: "{{ minecraft_view_distance }}" - ONLINE_MODE: "{{ minecraft_online_mode }}" - PLUGINS: "{{ minecraft_plugins | join(',') }}" + env: "{{ minecraft_env_base }}" restart_policy: always recreate: true state: started @@ -32,4 +27,23 @@ - "19132:19132/udp" network: - npm_internal - ip: '{{ minecraft_ip }}' \ No newline at end of file + ip: '{{ minecraft_ip }}' + vars: + minecraft_env_base: + EULA: "TRUE" + TYPE: PAPER + VERSION: "{{ minecraft_version }}" + MEMORY: "{{ minecraft_memory }}" + MOTD: "{{ minecraft_motd }}" + DIFFICULTY: "{{ minecraft_difficulty }}" + GAMEMODE: "{{ minecraft_gamemode }}" + MAX_PLAYERS: "{{ minecraft_max_players }}" + VIEW_DISTANCE: "{{ minecraft_view_distance }}" + ONLINE_MODE: "{{ minecraft_online_mode }}" + PLUGINS: "{{ minecraft_plugins | join(',') }}" + # Open server (no whitelist). Explicit FALSE so mc-image-helper writes white-list=false + # into server.properties on every boot (a stale TRUE would otherwise block all joins). + ENABLE_WHITELIST: "FALSE" + # Enables /tmp/minecraft-console-in so `podman exec minecraft mc-send-to-console ""` + # works for admin commands. + CREATE_CONSOLE_IN_PIPE: "TRUE" \ No newline at end of file diff --git a/roles/npm/tasks/main.yml b/roles/npm/tasks/main.yml index 82d148d..eb40473 100644 --- a/roles/npm/tasks/main.yml +++ b/roles/npm/tasks/main.yml @@ -1,4 +1,13 @@ --- +- name: Create NPM directories + ansible.builtin.file: + path: "{{ item }}" + state: directory + mode: '0755' + loop: + - /opt/apps/npm + - /opt/apps/letsencrypt + - name: Deploy Nginx Proxy Manager containers.podman.podman_container: image: "docker.io/jc21/nginx-proxy-manager:latest" diff --git a/roles/wazuh/tasks/main.yml b/roles/wazuh/tasks/main.yml index 80ff1a2..1cf767f 100644 --- a/roles/wazuh/tasks/main.yml +++ b/roles/wazuh/tasks/main.yml @@ -4,6 +4,12 @@ # DNS record must be grey-cloud (Cloudflare 523 lesson from vpn.boxswapper.io), cert via NPM # Config is copied from ./wazuh-docker/config before first deploy +- name: Create Wazuh config directory + ansible.builtin.file: + path: /opt/apps/wazuh/config + state: directory + mode: '0755' + - name: Copy Wazuh config files to host ansible.builtin.copy: src: ./wazuh-docker/config/ diff --git a/roles/wireguard/tasks/main.yml b/roles/wireguard/tasks/main.yml index 64f62f8..56662d5 100644 --- a/roles/wireguard/tasks/main.yml +++ b/roles/wireguard/tasks/main.yml @@ -24,6 +24,12 @@ # wg-easy "Podman + nftables" tutorial. # EXTERNAL ACCESS: router MUST forward UDP 51820 -> 192.168.0.98. Test from LTE, # not your LAN — NAT hairpin breaks public-IP handshakes from inside the network. +- name: Create WireGuard data directory + ansible.builtin.file: + path: /opt/apps/wireguard + state: directory + mode: '0755' + - name: Deploy WireGuard Easy (wg-easy) containers.podman.podman_container: name: wg-easy diff --git a/vars.yml b/vars.yml index 10c9c0c..26e2259 100755 --- a/vars.yml +++ b/vars.yml @@ -16,6 +16,7 @@ directories: - /opt/apps/wazuh/config/wazuh_dashboard - /opt/apps/wazuh/config/wazuh_indexer - /opt/apps/minecraft + - /opt/apps/minecraft/data ## Jellyfin directories for media @@ -74,7 +75,7 @@ minecraft_host: mc.boxswapper.io minecraft_ip: 10.10.0.45 minecraft_version: latest minecraft_memory: 2G -minecraft_motd: "Internal Apps Minecraft - mc.boxswapper.io" +minecraft_motd: "Welcome Retards" minecraft_difficulty: normal minecraft_gamemode: survival minecraft_max_players: 20