From 7d34d5e9314e7e7233aaa8866d27ea9ddc6690e0 Mon Sep 17 00:00:00 2001 From: Salt Date: Thu, 26 Aug 2021 03:35:11 -0500 Subject: [PATCH] Experiment with moving secrets to NetBox --- .gitignore | 1 + inventory/group_vars/all.yml | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 759895c..0b5904d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.swp .cache +private.pem diff --git a/inventory/group_vars/all.yml b/inventory/group_vars/all.yml index 205419d..ed74135 100644 --- a/inventory/group_vars/all.yml +++ b/inventory/group_vars/all.yml @@ -64,13 +64,14 @@ apache_ssl_protocol: all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 ##RESERVED # For gulagbot -secret_gulagbot_db_pass: !vault | - $ANSIBLE_VAULT;1.1;AES256 - 63386534643137613234643962663831353461356464363732613030626364366661626134643837 - 6466653931366539656662323330333363633732613061360a306565643932613635353435663039 - 61386334626437323934366634343162643932393834313235356664623537636162376464613061 - 3966393761626133320a646465376235346239333036326530363538306238626438653232623632 - 37616561326538636534393533613037336665333865613735646532656163373233 +secret_gulagbot_db_pass: "{{ query('netbox.netbox.nb_lookup', 'secrets', api_filter='name=secret_gulagbot_db_pass', api_endpoint='https://netbox.desu.ltd', token=netbox_token, key_file='private.pem')[0].value.plaintext }}" +#secret_gulagbot_db_pass: !vault | +# $ANSIBLE_VAULT;1.1;AES256 +# 63386534643137613234643962663831353461356464363732613030626364366661626134643837 +# 6466653931366539656662323330333363633732613061360a306565643932613635353435663039 +# 61386334626437323934366634343162643932393834313235356664623537636162376464613061 +# 3966393761626133320a646465376235346239333036326530363538306238626438653232623632 +# 37616561326538636534393533613037336665333865613735646532656163373233 secret_gulagbot_discord_token: !vault | $ANSIBLE_VAULT;1.1;AES256 37613664393766353738353139323365346639393538653834643633613564646537616532316336