Jim Rigsbee
2020-02-26 a88031495958d4341fb4782e2ba8ababc7303e2f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
== Contributing 
 
If you're reading this, hopefully you are considering helping out with the Ansible Agnostic Deployer for Red Hat enablement.
 
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.
 
=== Rules
 
* The Ansible <<coc,Code of Conduct>> still applies.
* For git messages, branch names, ..., follow <<gitstyle,Git Style Guide>>
* Should you wish to work on a completely new standard, GREAT, but please file an issue for tracking.
* To contribute, fork and make a pull request against the `development` branch.
* All tasks should be in YAML literal.
 
[source,xml]
----
# This
- name: Create a directory
  file:
      state: directory
      path: /tmp/deletethis
 
# Not this
- name: Create a directory
  file: state=directory path=/tmpt/deletethis
----
 
* There should be no space before a task hyphen
 
[source,yml]
----
# This
- name: Do something
 
# Not this
   - name: Do something
----
 
* Module arguments should be indented two spaces
 
[source,yml]
----
# This
- name: Create a directory
  file:
    state: directory
    path: /tmp/deletethis
 
# Not This
- name: Create a directory
  file:
      state: directory
      path: /tmp/deletethis
----
 
* There should be a single line break between tasks
* Tags should be in multi-line format and indented two spaces just like module arguments above
 
[source,xml]
----
# This
- name: "Check hosts.equiv"
  stat:
    path: /etc/hosts.equiv
  register: hosts_equiv_audit
  always_run: yes
  tags:
    - tag1
    - tag2
 
 
# Not This
- name: "Check hosts.equiv"
  stat:
      path: /etc/hosts.equiv
  register: hosts_equiv_audit
  always_run: yes
  tags: [tag1,tag2]
----
 
* Every task must be named and provide brief descriptions about the task being accomplished.
 
=== Git
 
Please follow the <<gitstyle,Git style guide>>.
 
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.
 
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.
 
=== Tips and links
 
* https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History[Rewriting Git History]
* http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html[Squashing commits with rebase]
* http://docs.ansible.com/ansible/community.html#community-code-of-conduct[Code of Conduct][[coc]]
* https://github.com/agis/git-style-guide[Git Style Guide][[gitstyle]]