Contributing
Steps
To contribute a role or fix back to this collection:
- Fork this repository
- Create a branch and make your changes
- Point your personal
requirements.ymlat your fork to test - Pull your fork
- Test only the roles you changed
- Once satisfied, open a merge request.
Fork this repository
Create a fork of this repository on GitLab; your changes and the merge request come from the fork.
Create a branch and make your changes
Use <ticket>-<summary>, or <summary> if there's no ticket for the branch name
Point your personal requirements.yml at your fork to test
yaml
collections:
- name: dotfilespro.roles
type: git
source: https://gitlab.com/yourname/dotfiles.git
version: your-branchOr keep upstream and add the fork as a second namespace, referencing yourname.dotfiles.<role> in your playbook:
yaml
collections:
- name: dotfilespro.roles
type: git
source: https://dotfiles.pro/repository.git
version: main
- name: yourname.dotfiles
type: git
source: https://gitlab.com/yourname/dotfiles.git
version: your-branchPull your fork
shell
ansible-galaxy collection install -r requirements.yml --upgradeTest only the roles you changed
With --tags, to avoid running the full playbook:
shell
ansible-playbook playbook.yaml --ask-become-pass --tags git
ansible-playbook playbook.yaml --ask-become-pass --tags git,aliasesOnce satisfied, open a merge request.
Revert requirements.yml back to main and open the merge request.
Guidelines
- Branch per feature or fix; don't commit to
maindirectly. - Run the linters before opening the MR:
pre-commit run --all-files. - Add a
CHANGELOG.mdentry for any functional change. - Update any docs your change affects.