From aa0b9d3c8572a0ecaabe1c0ebe7ab3cd0d50218e Mon Sep 17 00:00:00 2001 From: Markus Wellauer Date: Tue, 21 Mar 2023 15:01:07 +0100 Subject: [PATCH] fix: address typo --- README.md | 6 +++--- defaults/main.yml | 4 ++-- tasks/distribution/Microsoft Windows 10 Pro.yml | 2 +- tasks/distribution/Windows.yml | 2 +- templates/snmp/snmpd.conf.j2 | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 1fafda8..cd5f8fa 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,9 @@ ansible-galaxy install sbaerlocher.snmp | snmp_encryption | snmp_encryption | SNMP Encryption | | snmp_contact | | Optional: System Contact | | snmp_location | | Optional: System Location | -| snmp_agentadress_protocol.ipvX | udp / udp6 | Optional: SNMP Protocol, X for ipv4 or ipv6 | -| snmp_agentadress_adress.ipvX | {{ ansible_default_ipv4.address }} / {{ ansible_default_ipv6.address }} | Optional: SNMP bind address, X for ipv4 or ipv6 | -| snmp_agentadress_port.ipvX | 161 / 161 | Optional: SNMP port, X for ipv4 or ipv6 | +| snmp_agentaddress_protocol.ipvX | udp / udp6 | Optional: SNMP Protocol, X for ipv4 or ipv6 | +| snmp_agentaddress_address.ipvX | {{ ansible_default_ipv4.address }} / {{ ansible_default_ipv6.address }} | Optional: SNMP bind address, X for ipv4 or ipv6 | +| snmp_agentaddress_port.ipvX | 161 / 161 | Optional: SNMP port, X for ipv4 or ipv6 | ## Dependencies diff --git a/defaults/main.yml b/defaults/main.yml index 77b2719..291d917 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -13,7 +13,7 @@ snmp_user: snmp snmp_agentaddress_protocol: ipv4: udp ipv6: udp6 -snmp_agentaddress_adress: +snmp_agentaddress_address: ipv4: "{{ ansible_default_ipv4.address if ansible_default_ipv4.address is defined else '127.0.0.1' }}" ipv6: "{{ ansible_default_ipv6.address if ansible_default_ipv6.address is defined else '::1' }}" snmp_agentaddress_port: @@ -24,4 +24,4 @@ snmp_extension_list: - url: 'https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/distro' extend: '.1.3.6.1.4.1.2021.7890.1 distro {{ snmp_extension_scripts }}/distro' - url: 'https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/osupdate' - extend: 'osupdate {{ snmp_extension_scripts }}/osupdate' \ No newline at end of file + extend: 'osupdate {{ snmp_extension_scripts }}/osupdate' diff --git a/tasks/distribution/Microsoft Windows 10 Pro.yml b/tasks/distribution/Microsoft Windows 10 Pro.yml index c70c35b..bc87e01 100644 --- a/tasks/distribution/Microsoft Windows 10 Pro.yml +++ b/tasks/distribution/Microsoft Windows 10 Pro.yml @@ -34,7 +34,7 @@ notify: - restart win snmp -- name: 'windows : set remote IP-Adresss' +- name: 'windows : set remote IP-Address' set_fact: snmp_remoteip: "{{ lookup('dig', snmp_monitoring_server ) }}" when: not snmp_monitoring_server | ipaddr diff --git a/tasks/distribution/Windows.yml b/tasks/distribution/Windows.yml index 89cb750..6204a4e 100644 --- a/tasks/distribution/Windows.yml +++ b/tasks/distribution/Windows.yml @@ -75,4 +75,4 @@ localport: '161' remoteip: '{{ snmp_remoteip | default( snmp_monitoring_server ) }}' state: present - enabled: true \ No newline at end of file + enabled: true diff --git a/templates/snmp/snmpd.conf.j2 b/templates/snmp/snmpd.conf.j2 index 039bdb7..08acb5a 100644 --- a/templates/snmp/snmpd.conf.j2 +++ b/templates/snmp/snmpd.conf.j2 @@ -4,10 +4,10 @@ createUser {{ snmp_user }} SHA {{ snmp_password }} AES {{ snmp_encryption }} rouser {{ snmp_user }} priv {% if ansible_default_ipv4.address is defined %} -agentAddress {{ snmp_agentadress_protocol.ipv4 }}:{{ snmp_agentadress_adress.ipv4 }}:{{ snmp_agentadress_port.ipv4 }} +agentAddress {{ snmp_agentaddress_protocol.ipv4 }}:{{ snmp_agentaddress_address.ipv4 }}:{{ snmp_agentaddress_port.ipv4 }} {% endif %} {% if ansible_default_ipv6.address is defined %} -agentAddress {{ snmp_agentadress_protocol.ipv6 }}:{{ snmp_agentadress_adress.ipv6 }}:{{ snmp_agentadress_port.ipv6 }} +agentAddress {{ snmp_agentaddress_protocol.ipv6 }}:{{ snmp_agentaddress_address.ipv6 }}:{{ snmp_agentaddress_port.ipv6 }} {% endif %} {% if snmp_location is defined %}