Chris Hammer 7e758ca4f3 its been a while since i've worked on this
and it seems there were many changes left
uncommitted. i have no idea what state this is in
but we will refactor or start over from this point.
2023-12-08 00:56:58 -05:00

42 lines
939 B
YAML

---
- name: Include distribution specific variables or include defaults
block:
- name: Include distribution specific variables
include_vars:
file: "{{ ansible_distribution | lower }}_{{ ansible_distribution_major_version }}.yml"
rescue:
- name: Non-supported distribution; using default package set
include_vars:
file: __default_packages.yml
- name: Deploy and configure SNMP
block:
- name: Install SNMP
package:
name: "{{ __snmp_pkg }}"
state: present
- name: Ensure /etc/snmp directory is present
file:
path: /etc/snmp
state: directory
- name: Deploy snmpd.conf
template:
src: templates/snmpd_conf.j2
dest: "{{ __snmpd_conf_file }}"
mode: 0644
notify: restart snmpd
rescue:
- name: Unable to deploy SNMP
debug:
msg: "Unable to deploy SNMP to {{ inventory_hostname }}."
...