Files
johto-infra/roles/minecraft_server/handlers/main.yaml
T
jdelpilarandJordan Del Pilar 857ec00b14
Johto Infrastructure Pipeline / Run Ansible Lint (push) Successful in 1m52s
Johto Infrastructure Pipeline / Deploy to Production (push) Successful in 3m9s
feat(minecraft): add new minecraft server role (#19)
### Description
This PR adds new `minecraft_server` to configure and start a Minecraft server container on targeted hosts.

### Related Issue
Closes #18

### Testing Done
- [x] Verifed new role creates container files correctly
- [x] verified new container is able to start and run via systemd
- [x] verified server is accessible via Minecraft client

### Checklist
- [x] My code follows the project's style guidelines.
- [x] I have performed a self-review of my own code.
- [x] I have updated the documentation (if necessary).

---------

Co-authored-by: Jordan Del Pilar <[email protected]>
Reviewed-on: #19
2026-07-15 12:41:15 -07:00

8 lines
265 B
YAML

- name: Restart changed Minecraft Services
ansible.builtin.systemd:
name: "mc-{{ item.item.name }}"
state: restarted
scope: user
daemon_reload: true
loop: "{{ minecraft_quadlet_results.results | selectattr('changed', 'equalto', true) | list }}"