feat(ansible): add mod_config playbook#15
Open
easter423 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull Request Overview
Adds a new Ansible playbook for managing and syncing the Minecraft mod configuration directory from a Git repository, introduces configurable repository details, and documents its usage.
- Introduce
mod_config.ymlplaybook to clone, pull, and optionally push/opt/minecraft/config. - Create
ansible/vars/mods_sync.ymlfor setting repository URL, branch, and Git user. - Update README with instructions for running the new playbook.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| readme.md | Document how to run the mod_config.yml playbook |
| ansible/vars/mods_sync.yml | Define variables for config repository settings |
| ansible/mod_config.yml | Implement playbook tasks to manage the config repo |
Comments suppressed due to low confidence (3)
readme.md:60
- Update the example to reference the correct playbook path (e.g.,
ansible/mod_config.yml) to match its actual location.
ansible-playbook -i inventory.ini mod_config.yml
ansible/mod_config.yml:9
- [nitpick] Extract the hard-coded paths (
/opt/minecraft/configand/home/minecraft/.ssh) into playbook variables (e.g.,config_dest_path,ssh_dir) to improve flexibility and reuse.
path: /opt/minecraft/config
ansible/mod_config.yml:66
- Consider using the
ansible.builtin.gitmodule to handle repository initialization, cloning, pulling, and pushing for better idempotence and readability instead of rawgitcommands.
ansible.builtin.command: git init -b {{ config_repo_branch }}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mod_config.ymlplaybook for syncing/opt/minecraft/configvars/mods_sync.ymlTesting
ansible-lint ansible/mod_config.yml(fails: command-instead-of-module, inline-env-var, no-changed-when, no-handler)https://chatgpt.com/codex/tasks/task_e_68761773fa8c8324b948c35f4ca8f879