From 7434280321225bac0073dc4c42336d4ef7ba6b86 Mon Sep 17 00:00:00 2001 From: Jordi Prats Date: Wed, 26 Feb 2020 11:13:10 +0100 Subject: [PATCH] millora snmpv3 user --- CHANGELOG.md | 4 ++++ manifests/v3user.pp | 3 ++- metadata.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d207572..4f6c74b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 0.2.1 + +* millora check snmpv3 user + ## 0.2.0 * major rework diff --git a/manifests/v3user.pp b/manifests/v3user.pp index ca488aa..f654327 100644 --- a/manifests/v3user.pp +++ b/manifests/v3user.pp @@ -25,7 +25,8 @@ exec { "create snmpdv3 user ${username}": command => "/usr/local/bin/puppet_net-snmp-create-v3-user ${ro_flag} -A ${authpass} -a ${auth_algorithm} -X ${authpass} -x ${enc_algorithm} ${username}", - unless => "grep '${username}' ${snmpd::params::net_snmpd_persistent_datafile}", + # unless => "grep '${username}' ${snmpd::params::net_snmpd_persistent_datafile}", + unless => "snmpwalk -v3 -l authPriv -u nttrmmon -a SHA -A \"${authpass}\" -x AES -X \"${authpass}\" 127.0.0.1 .1.3.6.1.6.3.15.1.2.2.1.3 -t 1 -r 1", path => '/usr/sbin:/usr/bin:/sbin:/bin', require => Class['::snmpd::install'], notify => Class['::snmpd::service'], diff --git a/metadata.json b/metadata.json index 82d50ac..50d6fcf 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "eyp-snmpd", - "version": "0.2.0", + "version": "0.2.1", "author": "eyp", "summary": "SNMP agent management", "license": "Apache-2.0",