prompt for snmp community
This commit is contained in:
@@ -14,4 +14,6 @@
|
|||||||
- hosts: pi
|
- hosts: pi
|
||||||
roles:
|
roles:
|
||||||
- snmpd
|
- snmpd
|
||||||
|
vars_prompt:
|
||||||
|
- name: rocommunity
|
||||||
|
prompt: "Enter SNMP RO community name"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
regexp: "{{ item.regexp }}"
|
regexp: "{{ item.regexp }}"
|
||||||
line: "{{ item.line }}"
|
line: "{{ item.line }}"
|
||||||
with_items:
|
with_items:
|
||||||
- { regexp: '^\s+rocommunity\s+public\s+default\s+-V\s+systemonly', line: ' rocommunity public' }
|
- { regexp: '^\s+rocommunity\s+public\s+default\s+-V\s+systemonly', line: ' rocommunity {{ rocommunity }}' }
|
||||||
- { regexp: '^agentAddress\s+udp:127.0.0.1:161', line: 'agentAddress udp:161' }
|
- { regexp: '^agentAddress\s+udp:127.0.0.1:161', line: 'agentAddress udp:161' }
|
||||||
tags: configure_snmpd
|
tags: configure_snmpd
|
||||||
become: true
|
become: true
|
||||||
|
|||||||
Reference in New Issue
Block a user