Closed teleivo closed 8 years ago
Hi, so with hiera eyaml and gpg plugin https://github.com/TomPoulton/hiera-eyaml https://github.com/sihil/hiera-eyaml-gpg
I got it to work :+1:
It then looks like this
---
accounts::ssh_keys:
paul:
type: ssh-rsa
public: DEC(1)::GPG[xxxxxxx]!
private: |
DEC(3)::GPG[-----BEGIN RSA PRIVATE KEY-----
xxxxx
xxxxx
xxxxx
-----END RSA PRIVATE KEY-----
]!
Hello!
I am having trouble adding a private key from hiera. The ~/.ssh/id_rsa is created and it contains the data but in a different format than the original key because newlines are not passed on to the echo command.
My yaml file looks like this:
which leads to ~/.ssh/id_rsa being:
As an alternative I tried
which leads to ~/.ssh/id_rsa being:
understandable, since the command writing the file content is echo not interpreting the newline character https://github.com/camptocamp/puppet-accounts/blob/master/manifests/account.pp#L134
I would be very grateful if somebody could tell me how to add a private key via hiera :)