Skip to content

Commit

Permalink
Updating CONTRIBUTING
Browse files Browse the repository at this point in the history
  • Loading branch information
Mooash committed Apr 15, 2015
1 parent 90cae81 commit 9266bcd
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 17 deletions.
40 changes: 39 additions & 1 deletion CONTRIBUTING.md
@@ -1,2 +1,40 @@
Please see my contributing rules outlined here: http://mooash.github.io/contributing/
### General

I've set some general contribution outlines [here](https://mooash.github.io/contributing/#pk_campaign=GitHub-Project&pk_kwd=nagios-nrpe-server). Please read them before opening a pull request.

### Project Specific

#### Ansible formatting

I try and follow Ansible's [playbook best practices](https://docs.ansible.com/playbooks_best_practices.html) to the best of my ability. That said, these rules always apply:

* [Always Mention The State](https://docs.ansible.com/playbooks_best_practices.html#always-mention-the-state)
* Move big plays to multiple lines. Plays like template look ugly on single lines.
Not OK:

```yaml
# Create nrpe_ansible.cfg
- name: Create nrpe_ansible.cfg from template
sudo: true
template: src="nrpe_ansible.cfg.j2" dest="{{ nagios_nrpe_server_dir }}/nrpe_ansible.cfg" owner=root group=root mode=0644
notify: restart nagios-nrpe-server
```

OK:

```yaml
# Create nrpe_ansible.cfg
- name: Create nrpe_ansible.cfg from template
sudo: true
template: >
src="nrpe_ansible.cfg.j2"
dest="{{ nagios_nrpe_server_dir }}/nrpe_ansible.cfg"
owner=root group=root mode=0644
notify: restart nagios-nrpe-server
```
* If a play is OS specific, state it in the play name.
eg: `- name: Installing packages [Debian]` or `- name: Installing packages [RedHat]`

### Questions?

If you're confused on any of the above, just contact me so I can clear up my documentation.
1 change: 0 additions & 1 deletion LICENSE
Expand Up @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

1 change: 0 additions & 1 deletion README.md
Expand Up @@ -68,4 +68,3 @@ Author Information
------------------

Checkout my blog [here](http://www.mooash.me)

1 change: 0 additions & 1 deletion defaults/main.yml
Expand Up @@ -2,4 +2,3 @@
nagios_nrpe_server_bind_address: 127.0.0.1
nagios_nrpe_server_port: 5666
nagios_nrpe_server_allowed_hosts: 127.0.0.1

1 change: 0 additions & 1 deletion handlers/main.yml
Expand Up @@ -6,4 +6,3 @@
- name: restart nagios-nrpe-server
sudo: true
service: name="{{ nagios_nrpe_server_service }}" state=restarted

1 change: 0 additions & 1 deletion meta/main.yml
Expand Up @@ -21,4 +21,3 @@ galaxy_info:
- monitoring
- system
dependencies: []

1 change: 0 additions & 1 deletion tasks/main.yml
Expand Up @@ -59,4 +59,3 @@
- name: Ensure NRPE server is running
sudo: true
service: name="{{ nagios_nrpe_server_service }}" state=started enabled=yes

1 change: 0 additions & 1 deletion tasks/packages-archlinux.yml
Expand Up @@ -8,4 +8,3 @@
- name: Install Nagios NRPE Server [Arch Linux]
sudo: true
pacman: name=nrpe state=present

1 change: 0 additions & 1 deletion tasks/packages-debian.yml
Expand Up @@ -8,4 +8,3 @@
- name: Install Nagios NRPE Server [Debian]
sudo: true
apt: name=nagios-nrpe-server state=present

1 change: 0 additions & 1 deletion tasks/packages-redhat.yml
Expand Up @@ -10,4 +10,3 @@
sudo: true
yum: name=nagios-plugins-all state=present enablerepo="{{ nagios_nrpe_server_repo_redhat }}"
notify: restart nagios-nrpe-server

1 change: 0 additions & 1 deletion templates/nrpe.cfg.j2
Expand Up @@ -213,4 +213,3 @@ include={{ nagios_nrpe_server_dir }}/nrpe_ansible.cfg
# only snipplets ending in .cfg will get included
include_dir={{ nagios_nrpe_server_dir }}/nrpe.d/
{% endif %}

1 change: 0 additions & 1 deletion templates/nrpe_ansible.cfg.j2
Expand Up @@ -5,4 +5,3 @@

# Example check
command[check_mailq]={{ nagios_nrpe_server_plugins_dir }}/check_mailq -c 50 -w 20

1 change: 0 additions & 1 deletion vars/Archlinux.yml
Expand Up @@ -7,4 +7,3 @@ nagios_nrpe_server_group: 31
nagios_nrpe_server_service: nrpe
nagios_nrpe_server_plugins_dir: /usr/lib/monitoring-plugins
nagios_nrpe_server_dir: /etc/nrpe

1 change: 0 additions & 1 deletion vars/Debian.yml
Expand Up @@ -9,4 +9,3 @@ nagios_nrpe_server_group: nagios
nagios_nrpe_server_service: nagios-nrpe-server
nagios_nrpe_server_plugins_dir: /usr/lib/nagios/plugins
nagios_nrpe_server_dir: /etc/nagios

1 change: 0 additions & 1 deletion vars/RedHat-x64.yml
@@ -1,2 +1 @@
nagios_nrpe_server_plugins_dir: /usr/lib64/nagios/plugins

1 change: 0 additions & 1 deletion vars/RedHat-x86.yml
@@ -1,2 +1 @@
nagios_nrpe_server_plugins_dir: /usr/lib/nagios/plugins

1 change: 0 additions & 1 deletion vars/RedHat.yml
Expand Up @@ -9,4 +9,3 @@ nagios_nrpe_server_group: nrpe
nagios_nrpe_server_repo_redhat: epel
nagios_nrpe_server_service: nrpe
nagios_nrpe_server_dir: /etc/nagios

0 comments on commit 9266bcd

Please sign in to comment.