From 648e955ece633038835c7fbc1c79190f9b8f7a54 Mon Sep 17 00:00:00 2001 From: "stephane.david" Date: Sun, 16 Feb 2025 16:39:51 +0100 Subject: [PATCH] First configure snmpd playbook --- configure_snmpd.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 configure_snmpd.yml diff --git a/configure_snmpd.yml b/configure_snmpd.yml new file mode 100644 index 0000000..56881db --- /dev/null +++ b/configure_snmpd.yml @@ -0,0 +1,16 @@ +- name: Configure snmpd + hosts: all + tasks: + - name: Apt Update + ansible.builtin.apt: + update_cache: yes + + - name: Deploy snmpd + ansible.builtin.apt: + name: snmpd + + - name: Configure snmpd + shell : echo -e "agentAddress udp:161,udp6:[::1]:161\nrocommunity public default -V systemonly\nrwcommunity manage 192.168.1.30\nrwcommunity manage localhost\nrocommunity6 public default -V systemonly\nsysLocation SDA Corporation/Internet Server/\nsysContact thedarty@gmail.com\nextend osupdate /etc/snmp/osupdate" > /etc/snmp/snmpd.conf + + - name: Restart snmpd.service + shell : systemctl restart snmpd.service \ No newline at end of file