i believe that openssh private key files are already text encoded; it looks this way on my servers. this approach had occurred to me also - but can I write a simple, elegant task to get this variable into the file on the hosts? that's the part that wasn't obvious to me.
-- http://about.me/jeremy_schneider On Wed, Mar 5, 2014 at 2:25 PM, Jan-Piet Mens <[email protected]> wrote: > > my particular use case is an SSH private key file (password-less, used to > > enable jumping between servers in a cluster). normally i'd stick this in > > the files folder and use the copy module to push it. > > A bit convoluted maybe, but base64-encode the file, and add it to a YAML > vars file which is then put into ansible-vault? > > $ echo "myfile: $(openssl enc -a -A -in filename)" > vars.yml > myfile: > aGVsbG8Kd29ybGQKaGVsbG8Kd29ybGQKaGVsbG8Kd29ybGQKaGVsbG8Kd29ybGQKaGVsbG8Kd29ybGQK > > -JP > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Ansible Project" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/ansible-project/i31-qVAv4JM/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/20140305202555.GA21165%40tiggr.ww.mens.de > . > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BfnDAZmnAEjH40WfvRfJBf12hLC0bRxDob%3DQ7Ljkyfw8yij0A%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
