prompt for snmp community
This commit is contained in:
@@ -14,4 +14,6 @@
|
||||
- hosts: pi
|
||||
roles:
|
||||
- snmpd
|
||||
|
||||
vars_prompt:
|
||||
- name: rocommunity
|
||||
prompt: "Enter SNMP RO community name"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
regexp: "{{ item.regexp }}"
|
||||
line: "{{ item.line }}"
|
||||
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' }
|
||||
tags: configure_snmpd
|
||||
become: true
|
||||
|
||||
Reference in New Issue
Block a user