Compare commits
2 Commits
ba1d2e80ae
...
9ae63ef1cd
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ae63ef1cd | |||
| e43552b15d |
26
README.md
26
README.md
@@ -4,4 +4,28 @@
|
||||
ansible-playbook -i inventory.ini ansible-playbook.yml --ask-become-pass
|
||||
```
|
||||
|
||||
Internal Applications for home use all in Podman Ansible playbooks
|
||||
Internal Applications for home use all in Podman Ansible playbooks
|
||||
|
||||
## Running individual roles
|
||||
|
||||
Each role is tagged with its name — run one or more with `--tags`:
|
||||
|
||||
```bash
|
||||
# Run one role
|
||||
ansible-playbook -i inventory.ini ansible-playbook.yml --tags minecraft --ask-become-pass
|
||||
|
||||
# Run several
|
||||
ansible-playbook -i inventory.ini ansible-playbook.yml --tags "jellyfin,gitea" --ask-become-pass
|
||||
|
||||
# Pre-pull all images only
|
||||
ansible-playbook -i inventory.ini ansible-playbook.yml --tags images --ask-become-pass
|
||||
|
||||
# Skip one
|
||||
ansible-playbook -i inventory.ini ansible-playbook.yml --skip-tags wazuh --ask-become-pass
|
||||
|
||||
# Full run (no --tags) — unchanged behavior
|
||||
```
|
||||
|
||||
Tags: `packages`, `directories`, `sysctl`, `network`, `wireguard`, `npm`, `gitea`, `jellyfin`, `wazuh`, `minecraft`, `images`
|
||||
|
||||
Note: `--tags` runs skip the bulk image pull (tagged `images`); containers auto-pull their image on deploy (`podman_container` pull policy defaults to `missing`).
|
||||
@@ -8,16 +8,28 @@
|
||||
containers.podman.podman_image:
|
||||
name: "{{ item }}"
|
||||
loop: "{{ images }}"
|
||||
tags:
|
||||
- images
|
||||
|
||||
roles:
|
||||
- packages
|
||||
- directories
|
||||
- sysctl
|
||||
- network
|
||||
- wireguard
|
||||
- npm
|
||||
- gitea
|
||||
- jellyfin
|
||||
- wazuh
|
||||
- minecraft
|
||||
- role: packages
|
||||
tags: [packages]
|
||||
- role: directories
|
||||
tags: [directories]
|
||||
- role: sysctl
|
||||
tags: [sysctl]
|
||||
- role: network
|
||||
tags: [network]
|
||||
- role: wireguard
|
||||
tags: [wireguard]
|
||||
- role: npm
|
||||
tags: [npm]
|
||||
- role: gitea
|
||||
tags: [gitea]
|
||||
- role: jellyfin
|
||||
tags: [jellyfin]
|
||||
- role: wazuh
|
||||
tags: [wazuh]
|
||||
- role: minecraft
|
||||
tags: [minecraft]
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 }}'
|
||||
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 "<cmd>"`
|
||||
# works for admin commands.
|
||||
CREATE_CONSOLE_IN_PIPE: "TRUE"
|
||||
@@ -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"
|
||||
|
||||
@@ -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/
|
||||
|
||||
@@ -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
|
||||
|
||||
3
vars.yml
3
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
|
||||
|
||||
Reference in New Issue
Block a user