Skip to content

Commit

Permalink
BB: Fix SNMP agent configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
cakekoa committed Apr 21, 2023
1 parent e173484 commit 23ef556
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions envs/monkey_zoo/packer/setup_snmp_agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@

tasks:
- name: Install SNMP
ansible.builtin.apt:
apt:
name:
- snmp=5.7.3+dfsg-1.8ubuntu3
- snmpd=5.7.3+dfsg-1.8ubuntu3
- libsnmp30=5.7.3+dfsg-1.8ubuntu3
update_cache: yes
- name: Remove default SNMP configuration
file:
path: /etc/snmp/snmpd.conf
state: absent
- name: Configure SNMP
blockinfile:
path: /etc/snmp/snmpd.conf
backup: yes
create: yes
block: |
master agentx
Expand All @@ -29,10 +32,10 @@
rocommunity6 public default -V systemonly
rwcommunity {{ community_string }}
- name: Remove snmp.conf
ansible.builtin.file:
file:
path: /etc/snmp/snmp.conf
state: absent
- name: Disable security updates
ansible.builtin.apt:
apt:
name: unattended-upgrades
state: absent

0 comments on commit 23ef556

Please sign in to comment.