Posts

Showing posts with the label ansible

HashiCorp Vault Integration with Ansible Etower using approle

Image
HashiCorp Vault is  a secrets management tool specifically designed to control access to sensitive credentials in a low-trust environment . It can be used to store sensitive values and at the same time dynamically generate access for specific services/applications on lease.  Integrating the vault with Ansible Etower provides robust and secure automation. Following is the step-by-step guide for the integration. Enable key-value secret engine in Hashi Vault (also known as "kv" engine). Let's call the engine, the "kv" engine. Create a secret inside "kv". A secret can be a collection of key-value pairs or a JSON for nested structure.            Lets assume that secrets are stored as JSON  in the format   { "my_app":{ "service_account_name": "some_service", "service_account_password": "some_password" } } Create a secret policy defining what can be done with the above-defined secret. Create an...

Ansible variable inside variable.

 Lets assume there is a json with following structure 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 { "dev" :{ "app_1" :{ "key" : "element" , "value" : "somevalue" }, "app_2" :{ "key" : "element" , "value" : "somevalue" } }, "test" :{ "app_1" :{ "key" : "element" , "value" : "somevalue" }, "app_2" :{ "key" : "element" , "value" : "somevalue" } }, "production" :{ "app_1" :{ "key" : "element" , "value" : "somevalue" }, "app_2" :{ "key" : ...