- name: Install latest version of snmp
  ansible.builtin.yum:
    name: snmp
    state: latest
  become: true
  when: ansible_distribution == "Fedora"

- name: Install latest version of net-snmp
  ansible.builtin.yum:
    name: net-snmp
    state: latest
  become: true
  when: ansible_distribution == "Fedora"

- name: Install latest version of snmpd
  ansible.builtin.apt:
    name: snmpd
    state: latest
  become: true
  when: ansible_distribution == "Debian"

- name: Configure snmpmd
  ansible.builtin.copy:
    src: /home/dale/git/ansible/roles/provisioning/files/snmpd.conf
    dest: /etc/snmp/snmpd.conf
    owner: root
    group: root
    mode: 0640
  become: true
