Prompt user for input using boxen
Asked Answered
M

1

6

I'm completely new to boxen (and puppet) and I want to prompt a user for a password during set up. I need to encrypt the input and add it to a config file.

I'll be using a template to generate the file, but getting the password is a little tricky since puppet wont write to console when executing code inside of a template.

I've considered doing this using a ruby or shell script to prompt the user and then store the password in an environment variable to use later in the template, but I don't know if this is the best or most secure way to do this.

Any suggestions? is there a "best practice" for doing this sort of thing with boxen/puppet?

Melindamelinde answered 29/10, 2013 at 4:40 Comment(2)
I have a similar question over on the Boxen issue queue. No answer. Maybe you can add your voice there to see if we can get some guidance from the GitHub team - github.com/boxen/our-boxen/issues/570Helio
thanks for the heads up... I've added this comment to your thread, hopefully octocat can save us.Melindamelinde
J
0

You can use hiera and encrypt hiera data using the hiera-gpg or hiera-eyaml backend

Other option is to use facter with environment variables FACTER_MYPASSWORD or external facts under /etc/facter/facts.d

Jus answered 21/9, 2014 at 10:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.