Thank you for your interest in contributing to MacAutomation! This document provides guidelines and information about contributing to this project.
Assaf Feuerstein
DevOps Engineer | Infrastructure Automation Specialist
By participating in this project, you agree to maintain a respectful and inclusive environment for everyone.
- Check existing issues - Before creating a new issue, please check if the issue already exists.
- Use issue templates - When creating a new issue, provide as much detail as possible:
- macOS version
- Architecture (Intel or Apple Silicon)
- Ansible version
- Error messages and logs
- Steps to reproduce
-
Fork the repository and create your branch from
main:git checkout -b feature/my-new-feature
-
Make your changes following the coding guidelines below.
-
Test your changes on at least one macOS version/architecture.
-
Commit your changes with clear, descriptive commit messages:
git commit -m "Add new role for XYZ tool installation" -
Push to your fork and submit a Pull Request.
- Idempotency: All tasks should be idempotent (safe to run multiple times)
- Documentation: Include comments explaining complex logic
- Variables: Use descriptive variable names in snake_case
- Defaults: Always provide sensible defaults in
defaults/main.yml - Tags: Use tags for granular playbook execution
Every role should follow this structure:
roles/my-role/
├── defaults/
│ └── main.yml # Default variables
├── tasks/
│ └── main.yml # Main tasks
├── meta/
│ └── main.yml # Role metadata and dependencies
├── README.md # Role documentation
├── files/ # Static files (if needed)
└── templates/ # Jinja2 templates (if needed)
- Every role must have a
README.mdwith:- Description
- Requirements
- Role Variables (table format)
- Dependencies
- Example Playbook
- Author attribution
- Test roles on both Intel and Apple Silicon Macs when possible
- Document any architecture-specific behavior
- Use
--checkmode to verify idempotency
Use clear, descriptive commit messages:
feat: Add new role for tool XYZ
fix: Correct path detection on Apple Silicon
docs: Update README with new examples
refactor: Simplify installation logic
- Update the README.md with details of changes if applicable
- Update role documentation if you've modified role behavior
- Ensure all tests pass and changes work on macOS
- The PR will be reviewed and merged by the maintainer
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/MacAutomation.git cd MacAutomation -
Create a virtual environment (optional but recommended):
python3 -m venv venv source venv/bin/activate pip install ansible ansible-lint -
Install Ansible collections:
ansible-galaxy collection install community.general
-
Lint your playbooks:
ansible-lint playbooks/*.yml roles/*/tasks/*.yml
When adding a new role:
-
Create the role structure using
ansible-galaxy:cd roles ansible-galaxy role init my-new-role -
Remove unnecessary directories (keep what you need)
-
Add author attribution to all files:
# Author: Assaf Feuerstein -
Write comprehensive documentation
-
Test on both architectures if possible
If you have questions about contributing, feel free to open an issue with your question.
Thank you for contributing to MacAutomation!