dceb09d886
Change-Id: I00bf872e8504efb26d20832f1da82da8cfe87258
29 lines
618 B
YAML
29 lines
618 B
YAML
- name: Include OS-specific variables
|
|
include_vars: "{{ lookup('first_found', params) }}"
|
|
vars:
|
|
params:
|
|
files: "{{ distro_lookup_path }}"
|
|
paths:
|
|
- 'vars'
|
|
|
|
- name: Install snmpd
|
|
package:
|
|
state: present
|
|
name: '{{ package }}'
|
|
|
|
- name: Write snmpd config file
|
|
template:
|
|
src: snmpd.conf
|
|
dest: /etc/snmp/snmpd.conf
|
|
mode: 0444
|
|
notify:
|
|
- Restart snmpd
|
|
|
|
# We don't usually ensure services are running, but snmp is generally
|
|
# not public facing and is easy to overlook.
|
|
- name: Enable snmpd
|
|
service:
|
|
name: "{{ service_name }}"
|
|
enabled: true
|
|
state: started
|