Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: address typo #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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'
extend: 'osupdate {{ snmp_extension_scripts }}/osupdate'
2 changes: 1 addition & 1 deletion tasks/distribution/Microsoft Windows 10 Pro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tasks/distribution/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@
localport: '161'
remoteip: '{{ snmp_remoteip | default( snmp_monitoring_server ) }}'
state: present
enabled: true
enabled: true
4 changes: 2 additions & 2 deletions templates/snmp/snmpd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down