Dear All,
I am new to Puppet. Recently started l learning it.
I need to push multiple ssh keys for client machine,
Here is what I have written:
Hiera:
# cat hiera.yaml | grep -v ^#
---
:backends:
- yaml
:hierarchy:
- global
:yaml:
:datadir: /etc/puppet/hieradata
# cat /etc/puppet/hieradata/global.yaml
# hash with keys in the hiera structure. The hash is merged with hiera_hash
lookup
sshkeys::keys:
sg-vm-agent-004:
user: 'ubuntu'
type: 'ssh-rsa'
key:
'AAAAB3NzaC1yc2EAAAADAQABAAABAQDJzdGydf2tdZYCkBRGx/SnlVKW+9q3Mqtf9vCrs0SaSkwDK4Q36hS40IVgmri2mjKeWFr5p92OgYY1hjZk4LLUAbVV8ItmPLqvmfrkOEwDCzmkbrUVa4BTKePWG0hOGAVYSQkS+1vhsTFhtznJMxsjRVwj8tO3s0fSnaXcovs9d4LwXhRbcDjzrAVRkk2d5/lSbjc/T4ZJ6oMKcGCxq02etJMoSBBQsEfRP/vULqKjoxJ96kb3Y43tU7gRzcVkXAyNqpXie8fD/FopoVi/uHIqkzotkOwztUYNt6C5LwV/W4ds5x3Zl7Jo4kqup2FOCs4oXSC3WxJI5FJ9WuPMtK1r'
# cat site.pp
$keys_hash = hiera_hash('sshkeys::keys',undef)
$username=$keys_hash[$hostname]['user']
sshkeys::key { "$hostname":
key_name => "$hostname",
user => "$username",
}
How to push multiply ssh keys to client?
thanks for your time
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/d9125204-7e05-472c-8029-1cb6f0a1c476%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.