mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-ansible-private.git
synced 2026-05-14 00:15:20 +00:00
Merge branch 'main' of https://gitea.fenix-dev.com/fenix-gitea-admin/iac-ansible-private
This commit is contained in:
@ -4,17 +4,31 @@ metadata:
|
||||
name: minecraft-configmap
|
||||
namespace: minecraft
|
||||
data:
|
||||
SERVER_NAME: "Example Minecraft Server"
|
||||
EULA: "true"
|
||||
MAX_PLAYERS: "10"
|
||||
ENABLE_WHITELIST: "true"
|
||||
OPS: |
|
||||
tomas
|
||||
Shy_Doge
|
||||
aleroqu
|
||||
kiuma
|
||||
WHITELIST: |
|
||||
tomas
|
||||
Shy_Doge
|
||||
aleroqu
|
||||
kiuma
|
||||
EULA: "TRUE"
|
||||
TYPE: "NEOFORGE"
|
||||
VERSION: "1.21.1"
|
||||
NEOFORGE_VERSION: "21.1.219"
|
||||
MEMORY: "9336M"
|
||||
MOTD: "Bemvindos ao mundo fenix"
|
||||
ONLINE_MODE: "false"
|
||||
DIFFICULTY: "2"
|
||||
ENABLE_COMMAND_BLOCK: "true"
|
||||
SIMULATION_DISTANCE: "8"
|
||||
VIEW_DISTANCE: "8"
|
||||
SEED: "fenix"
|
||||
LEVEL: "world-fenix"
|
||||
LEVEL_TYPE: "large_biomes"
|
||||
ENABLE_WHITELIST: "true"
|
||||
CURSEFORGE_FILES: |-
|
||||
1356598
|
||||
CF_API_KEY: "apikeyhere"
|
||||
MODRINTH_PROJECTS: |-
|
||||
bluemap:5.7-neoforge
|
||||
MODRINTH_DOWNLOAD_DEPENDENCIES: "required"
|
||||
ALLOW_FLIGHT: "true"
|
||||
ANNOUNCE_PLAYER_ACHIEVEMENTS: "true"
|
||||
SERVER_NAME: "FenixMine"
|
||||
UID: "1013"
|
||||
GID: "1013"
|
||||
LOG_IPS: "false"
|
||||
USE_AIKAR_FLAGS: "false"
|
||||
@ -11,3 +11,30 @@ spec:
|
||||
app: minecraft
|
||||
type: LoadBalancer
|
||||
loadBalancerIP: 192.168.1.153
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: minecraft-bluemap-service
|
||||
namespace: minecraft
|
||||
spec:
|
||||
ports:
|
||||
- port: 8100
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: minecraft
|
||||
type: ClusterIP
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: minecraft-rcon-service
|
||||
namespace: minecraft
|
||||
spec:
|
||||
ports:
|
||||
- port: 25575
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: minecraft
|
||||
type: ClusterIP
|
||||
|
||||
|
||||
@ -37,12 +37,19 @@ spec:
|
||||
requests:
|
||||
cpu: 2
|
||||
memory: 5Gi
|
||||
limits:
|
||||
cpu: 2
|
||||
memory: 11Gi
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: minecraft-configmap
|
||||
ports:
|
||||
- containerPort: 25565
|
||||
name: serverport
|
||||
- containerPort: 8100
|
||||
name: bluemap
|
||||
- containerPort: 25575
|
||||
name: rcon
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
|
||||
@ -1,18 +1,18 @@
|
||||
- name: Remover o diretório /tmp/stack-arr/minecraft/kubernetes-files
|
||||
- name: Remover o diretório /tmp/minecraft/minecraft/kubernetes-files
|
||||
ansible.builtin.file:
|
||||
path: /tmp/stack-arr/minecraft/kubernetes-files
|
||||
path: /tmp/minecraft/minecraft/kubernetes-files
|
||||
state: absent
|
||||
|
||||
- name: Criar diretório temporário no remoto
|
||||
file:
|
||||
path: /tmp/stack-arr/minecraft/kubernetes-files
|
||||
path: /tmp/minecraft/minecraft/kubernetes-files
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Copy file with owner and permissions
|
||||
ansible.builtin.copy:
|
||||
src: ../files
|
||||
dest: /tmp/stack-arr/minecraft/kubernetes-files
|
||||
dest: /tmp/minecraft/minecraft/kubernetes-files
|
||||
owner: fenix
|
||||
group: root
|
||||
mode: '0644'
|
||||
@ -26,6 +26,7 @@
|
||||
bw get item "{{ item.id }}" --session $BW_SESSION | jq -r '.notes' > {{ item.dest }}
|
||||
loop:
|
||||
- { id: "iac.ansible.minecraft.minecraft.secret", dest: "/tmp/minecraft/minecraft/kubernetes-files/files/minecraft-secret.yaml" }
|
||||
- { id: "iac.ansible.minecraft.minecraft.configmap", dest: "/tmp/minecraft/minecraft/kubernetes-files/files/minecraft-configmap.yaml" }
|
||||
args:
|
||||
executable: /bin/bash
|
||||
environment:
|
||||
@ -33,7 +34,7 @@
|
||||
|
||||
|
||||
- name: Listar conteúdo do diretório remoto
|
||||
shell: ls -l /tmp/stack-arr/minecraft/kubernetes-files/files
|
||||
shell: ls -l /tmp/minecraft/minecraft/kubernetes-files/files
|
||||
register: resultado_ls
|
||||
|
||||
|
||||
@ -46,7 +47,7 @@
|
||||
become: yes
|
||||
become_user: fenix
|
||||
shell: |
|
||||
kubectl apply -f /tmp/stack-arr/minecraft/kubernetes-files/files/minecraft-namespace.yaml
|
||||
kubectl apply -f /tmp/stack-arr/minecraft/kubernetes-files/files/
|
||||
kubectl apply -f /tmp/minecraft/minecraft/kubernetes-files/files/minecraft-namespace.yaml
|
||||
kubectl apply -f /tmp/minecraft/minecraft/kubernetes-files/files/
|
||||
environment:
|
||||
KUBECONFIG: /home/fenix/.kube/config
|
||||
Reference in New Issue
Block a user