1

Hello there thanks for helping me, I am trying the secure my environment variables (staging/production) using the Ansible-vault. and I need to give the encrypted data's in the knexfile.jslike this:

production: {
client: 'mysql',
connection: {
    host: 'xxxxxxxx.xxxxx.us.east.1.rds.amazonaws.com',
    user: 'sample-app-staging',
    password: 'samplefoopass',
    database: 'staging_db'
    }
}

here instead of giving the user and password directly i am trying to encrypt the variables. I have tried to encrypt there files by adding it in the credentials.yaml

---
connection: {
        DEV_DATABASE: staging_db
        DEV_HOST: xxxxxxxx.xxxxx.us.east.1.rds.amazonaws.com
        DEV_PASS: samplefoopass
        DEV_USER: sample-app-staging
        }

And I tried to enctypt it by using ansible-vault encrypt credentials.yaml and the file is encrypted but I don't have any idea how to access these data's.

sethupathi
  • 81
  • 1
  • 3

0 Answers0