Skip to content

feat(ansible): add mod_config playbook#15

Open
easter423 wants to merge 1 commit into
mainfrom
codex/create-ansible-playbook-for-git-config
Open

feat(ansible): add mod_config playbook#15
easter423 wants to merge 1 commit into
mainfrom
codex/create-ansible-playbook-for-git-config

Conversation

@easter423
Copy link
Copy Markdown
Owner

Summary

  • add mod_config.yml playbook for syncing /opt/minecraft/config
  • allow configuration of repo details in vars/mods_sync.yml
  • document playbook usage in the README

Testing

  • 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

Copilot AI review requested due to automatic review settings July 15, 2025 10:29
@easter423 easter423 self-assigned this Jul 15, 2025
@easter423 easter423 added the enhancement New feature or request label Jul 15, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml playbook to clone, pull, and optionally push /opt/minecraft/config.
  • Create ansible/vars/mods_sync.yml for 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/config and /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.git module to handle repository initialization, cloning, pulling, and pushing for better idempotence and readability instead of raw git commands.
      ansible.builtin.command: git init -b {{ config_repo_branch }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants