James Read
2020-02-25 eab74b8200fd7af0e496ec3a472c3d7e1a9dbe53
commit | author | age
eab74b 1 == Contributing 
6f95e1 2
d43558 3 If you're reading this, hopefully you are considering helping out with the Ansible Agnostic Deployer for Red Hat enablement.
6f95e1 4
S 5 Herein lies the contribution guidelines for helping out with this project. Do take the guidelines here literally, if you find issue with any of them or you see room for improvement, please let us know via a GitHub issue.
6
eab74b 7 === Rules
6f95e1 8
eab74b 9 * The Ansible <<coc,Code of Conduct>> still applies.
JR 10 * For git messages, branch names, ..., follow <<gitstyle,Git Style Guide>>
6f95e1 11 * Should you wish to work on a completely new standard, GREAT, but please file an issue for tracking.
d43558 12 * To contribute, fork and make a pull request against the `development` branch.
6f95e1 13 * All tasks should be in YAML literal.
S 14
eab74b 15 [source,xml]
JR 16 ----
6f95e1 17 # This
S 18 - name: Create a directory
19   file:
20       state: directory
21       path: /tmp/deletethis
22
23 # Not this
24 - name: Create a directory
25   file: state=directory path=/tmpt/deletethis
eab74b 26 ----
6f95e1 27
S 28 * There should be no space before a task hyphen
29
eab74b 30 [source,yml]
JR 31 ----
6f95e1 32 # This
S 33 - name: Do something
34
35 # Not this
36    - name: Do something
eab74b 37 ----
6f95e1 38
S 39 * Module arguments should be indented two spaces
40
eab74b 41 [source,yml]
JR 42 ----
6f95e1 43 # This
S 44 - name: Create a directory
d43558 45   file:
6f95e1 46     state: directory
S 47     path: /tmp/deletethis
48
49 # Not This
50 - name: Create a directory
51   file:
52       state: directory
53       path: /tmp/deletethis
eab74b 54 ----
6f95e1 55
S 56 * There should be a single line break between tasks
57 * Tags should be in multi-line format and indented two spaces just like module arguments above
58
eab74b 59 [source,xml]
JR 60 ----
6f95e1 61 # This
S 62 - name: "Check hosts.equiv"
63   stat:
64     path: /etc/hosts.equiv
65   register: hosts_equiv_audit
66   always_run: yes
67   tags:
68     - tag1
69     - tag2
70
71
72 # Not This
73 - name: "Check hosts.equiv"
74   stat:
75       path: /etc/hosts.equiv
76   register: hosts_equiv_audit
77   always_run: yes
78   tags: [tag1,tag2]
eab74b 79 ----
6f95e1 80
S 81 * Every task must be named and provide brief descriptions about the task being accomplished.
82
eab74b 83 === Git
JR 84
85 Please follow the <<gitstyle,Git style guide>>.
d43558 86
GC 87 Note: during the review process, you may add new commits to address review comments or change existing commits. However, before getting your PR merged, please squash commits to a minimum set of meaningful commits.
88
89 If you've broken your work up into a set of sequential changes and each commit pass the tests on their own then that's fine. If you've got commits fixing typos or other problems introduced by previous commits in the same PR, then those should be squashed before merging.
90
eab74b 91 === Tips and links
d43558 92
eab74b 93 * https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History[Rewriting Git History]
JR 94 * http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html[Squashing commits with rebase]
95 * http://docs.ansible.com/ansible/community.html#community-code-of-conduct[Code of Conduct][[coc]]
96 * https://github.com/agis/git-style-guide[Git Style Guide][[gitstyle]]
d43558 97