Skip to content

Latest commit

 

History

History
157 lines (122 loc) · 4.53 KB

CONTRIBUTING.md

File metadata and controls

157 lines (122 loc) · 4.53 KB

Contribution Guidelines

Your contribution is very welcome! =]

Requirements

Python 3.8+ Ansible 8.1.0+ Ansible Galaxy 2.10+

Installing the repository project

Execute the following steps below alway you've desire to evolve this repository content:

$ git remote add upstream https://github.com/marylly/ansible-utils
.
$ git remote -v
.

Create a feature branch using the command below:

$ git checkout -b BRANCH_NAME
.

Activate the Ansible Version installed in your environment, I've used pyenv:

$ source $HOME/ansible-8.1.0/bin/activate
.

Inside the repository folder you can start adding or updating code:

cd ansible-utils/
$ (ansible7.1.0) ➜  ansible-utils git:(master) ✗ ansible-galaxy list --roles-path roles
# $HOME/dev/ansible-utils/roles
- vnc_macos, (unknown version)
- visualcode_debian, (unknown version)
- telegram_macos, (unknown version)
- spotify_macos, (unknown version)
- firefox_macos, (unknown version)
- virtualbox_macos, (unknown version)
- terraform_macos, (unknown version)
- minikube, (unknown version)
- nvm_macos, (unknown version)
- golang_macos, (unknown version)
- studying_tools, (unknown version)
- visualcode_macos, (unknown version)
- tfenv_macos, (unknown version)
- slack_macos, (unknown version)
- awscli_macos, (unknown version)
- docker_macos, (unknown version)
- docker_machine_macos, (unknown version)
- iterm_macos, (unknown version)
- postman_macos, (unknown version)
- visualcode_extensions, (unknown version)
- gimp_macos, (unknown version)
- podman_macos, (unknown version)
- golang_debian, (unknown version)
- node_macos, (unknown version)
- google_chrome_macos, (unknown version)
- java_macos, (unknown version)
- zoom_macos, (unknown version)

To create a new role for new installation you can use ansible-galaxy and init a new one with the name of the tool with separated by underscore, the OS the installation is for:

$ ansible-galaxy role init gvm_macos --init-path roles
.

After create the new tool role, you have to update the main.yaml file existent in the repository root folder:

- hosts:
    localhost
  connection: local
  roles:
  ...
    - { role: gvm_macos,            tags: ['gvm_role'],             when: ansible_os_family == 'Darwin' }

Execute the new role to evaluate its installation:

$ ansible-playbook -i hosts -b --tags gvm_role -K main.yml
.

Pre-Commit

The pre-commit hooks help to point out issues in code such as missing semicolons, trailing whitespace, debug statements and some code convention simple issues before submission to code review or prevent from continuous integration issues optimizing development time, it allows a code reviewer to focus on the architecture of a change while not wasting time with trivial style nitpicks.

Our pre-commit verify the following points in commit staged files:

  • JSON syntax and conventions
  • Markdown syntax and conventions
  • Terraform syntax and conventions
  • YAML syntax and conventions

Installing

For Unix OS-Like: You can install pre-commit is through pip install:

$ pip install pre-commit
.
$ pre-commit --version
pre-commit 3.3.2

For MacOS: Another way to install pre-commit is through brew install:

$ brew install pre-commit
.
$ pre-commit --version
pre-commit 3.3.2

NOTE: Maybe we can have problem installation if you use Ruby 2.6.x locally. To avoid the problem, we recommend you install rvm or rbenv and use a local installation of Ruby 2.7.x.

After pre-commit installed, inside the project folder where the .pre-commit-config.yaml run the pre-commit hooks installation:

$ pre-commit install
.

Pull request process

Before submitting a pull request, please ensure that you meet these requirements:

  • My code follows the same style as the code in this project
  • I have formatted my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have updated the README.md with details of changes (if necessary)
  • Make an individual pull request for each suggestion.
  • New categories, or improvements to the existing categorization are welcome.
  • Keep descriptions short and simple, but descriptive.
  • Check your spelling and grammar.
  • Make sure your text editor is set to remove trailing whitespace.
  • Use the #readme anchor for GitHub READMEs to link them directly

Thank you for your suggestions!