aboutsummaryrefslogtreecommitdiffstats
path: root/roles/snmp/README.md
blob: f5c10b5c4e4e333d702be63d04daf398dac87dc7 (plain)
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
SNMP
====

Description
-----------

The `snmp` role installs [net-snmp](http://www.net-snmp.org/) and adds
SNMPv3 user accounts.

Variables
---------

This role **accepts** the following variables:

Variable           | Default                                         | Description
-------------------|-------------------------------------------------|------------
`snmp_location`    | `unknown`                                       | SNMP location string
`snmp_contact`     | `root@{{ email_domain }}`                       | SNMP email contact
`snmp_force_users` | no                                              | Re-create SNMPv3 users even if they already exist
`snmp_v3_users`    | nagios user (see [defaults](defaults/main.yml)) | SNMPv3 user accounts (see [format](#snmp_v3_users) below)

### snmp\_v3\_users

The `snmp_v3_users` variable specifies the SNMPv3 users to create. It should
contain a list of dictionaries of the following format:

Key         | Default    | Description
------------|------------|------------
`name`      |       | SNMPv3 username
`auth_pass` |       | SNMPv3 authentication password
`priv_pass` |       | SNMPv3 privacy password

Usage
-----

Example playbook:

````yaml
- name: configure SNMP client
  hosts: all
  roles:
    - role: snmp
      vars:
        snmp_location: my datacenter
        snmp_contact: sysadmins@example.com
        snmp_v3_users:
          - name: nagios
            auth_pass: s3cret
            priv_pass: hunter2
````