From 4870c67c9c06777b95b648eb9d3de10932e9ad0b Mon Sep 17 00:00:00 2001 From: Salt Date: Sun, 2 Aug 2020 19:50:13 -0500 Subject: [PATCH] Reorganize snmpd vars --- inventory/group_vars/9iron.club.yml | 47 +++++++++++++++-------------- roles/snmpd/templates/snmpd.conf | 10 +++--- 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/inventory/group_vars/9iron.club.yml b/inventory/group_vars/9iron.club.yml index 87e5ae5..40fcbb9 100644 --- a/inventory/group_vars/9iron.club.yml +++ b/inventory/group_vars/9iron.club.yml @@ -147,26 +147,27 @@ pleroma: 3563396435643363620a646337346561393863366361643536356363626334343264343861663131 3466 # snmpd -snmp_location: "us-east-2" -snmp_contact: "Salt " -snmp_auth_user_pass: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 36373662333533616331623933343364663532326261653636363732323138633836356633623934 - 6561333833343432353561366438313165383163366131630a653163666463356462633966666330 - 38323965303639356635613565633030373836643132336332373730303137376165616163646538 - 3162616233366236350a626130643230323264343938373134653034636232303130623134393531 - 61366330316330646137336161623166343835316432363433373333323232383166 -snmp_priv_user_pass: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 61316538316630333662633665646364356138613730633334653761626636633836363335383965 - 6332303265323236383130383366336662626331613866340a636139366135313134303538613833 - 61383662306163663634333538343733663836633834373462616265366365626533366334383031 - 6265643764656461320a313137326430386532653538346462323463386538303966303830343037 - 63333632656534333334383666666138353435383938623934663766623735656533 -snmp_int_user_pass: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 31616561323762653439346630653231646137626638383930346437323139666163316131333534 - 6463313537316230363735346236323033386562373032330a326261393039663539353738643465 - 36666136663930663463373731663534316232643637623732346331383737643233626235613439 - 3733366462613133620a386336303434303130313636356339633939623638366236346234376566 - 65386530663137393830636134653632623366333837616364396161666464613166 +snmp: + location: "us-east-2" + contact: "Salt " + auth_user_pass: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 36373662333533616331623933343364663532326261653636363732323138633836356633623934 + 6561333833343432353561366438313165383163366131630a653163666463356462633966666330 + 38323965303639356635613565633030373836643132336332373730303137376165616163646538 + 3162616233366236350a626130643230323264343938373134653034636232303130623134393531 + 61366330316330646137336161623166343835316432363433373333323232383166 + priv_user_pass: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 61316538316630333662633665646364356138613730633334653761626636633836363335383965 + 6332303265323236383130383366336662626331613866340a636139366135313134303538613833 + 61383662306163663634333538343733663836633834373462616265366365626533366334383031 + 6265643764656461320a313137326430386532653538346462323463386538303966303830343037 + 63333632656534333334383666666138353435383938623934663766623735656533 + int_user_pass: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 31616561323762653439346630653231646137626638383930346437323139666163316131333534 + 6463313537316230363735346236323033386562373032330a326261393039663539353738643465 + 36666136663930663463373731663534316232643637623732346331383737643233626235613439 + 3733366462613133620a386336303434303130313636356339633939623638366236346234376566 + 65386530663137393830636134653632623366333837616364396161666464613166 diff --git a/roles/snmpd/templates/snmpd.conf b/roles/snmpd/templates/snmpd.conf index 1607211..c076f75 100644 --- a/roles/snmpd/templates/snmpd.conf +++ b/roles/snmpd/templates/snmpd.conf @@ -2,9 +2,9 @@ agentAddress udp:161,udp6:[::1]:161 # Create users -createUser authOnlyUser SHA {{ snmp_auth_user_pass }} -createUser authPrivUser SHA {{ snmp_priv_user_pass }} -createUser internalUser SHA {{ snmp_int_user_pass }} +createUser authOnlyUser SHA {{ snmp.auth_user_pass }} +createUser authPrivUser SHA {{ snmp.priv_user_pass }} +createUser internalUser SHA {{ snmp.int_user_pass }} ############################################################################### # @@ -46,8 +46,8 @@ view systemonly included .1.3.6.1.2.1.25.1 # Note that setting these values here, results in the corresponding MIB objects being 'read-only' # See snmpd.conf(5) for more details -sysLocation {{ snmp_location }} -sysContact {{ snmp_contact }} +sysLocation {{ snmp.location }} +sysContact {{ snmp.contact }} # Application + End-to-End layers sysServices 72