Skip to content

Instantly share code, notes, and snippets.

View krishnakumar4a4's full-sized avatar
💭
I like to talk tech

Krishna Kumar Thokala krishnakumar4a4

💭
I like to talk tech
View GitHub Profile
@krishnakumar4a4
krishnakumar4a4 / Ansible-Vault how-to.md
Created February 23, 2018 09:13 — forked from tristanfisher/Ansible-Vault how-to.md
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

##Working with ansible-vault

I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.

@krishnakumar4a4
krishnakumar4a4 / main.rs
Created February 17, 2018 02:15 — forked from jaysonsantos/main.rs
rust ring example
extern crate ring;
use ring::aead::*;
use ring::pbkdf2::*;
use ring::rand::SystemRandom;
fn main() {
// The password will be used to generate a key
let password = b"nice password";