Ask Your Question

MookiE's profile - activity

2013-07-19 03:57:05 -0600 received badge  Popular Question (source)
2013-07-19 03:57:05 -0600 received badge  Famous Question (source)
2013-07-19 03:57:05 -0600 received badge  Notable Question (source)
2013-06-05 11:36:03 -0600 received badge  Student (source)
2013-06-05 08:15:58 -0600 commented answer How can I create ssh_authorized_keys from hiera hash with create_resources for multiple users?

I wrote "with create_resources in the manifest I use to create the users". I have a defined resource which I call with user::system { 'username': } in the user/manifest/system ... (more)

2013-06-05 05:28:05 -0600 commented question Cannot get hiera_config to work

It's just a guess but have you tried to use " instead of ' in the hiera.yaml if you use variables?

2013-06-05 05:23:15 -0600 asked a question How can I create ssh_authorized_keys from hiera hash with create_resources for multiple users?

Hi,

I have some ssh keys in stored in the a hiera yaml file:

---
ssh_keys:
  bob:
    key: 'cryptosshpublickey'
  jon:
    type: 'ssh-dss'
    key: 'anothercryptosshpublickey'

Now I want to create some ssh_authorized_key resources with create_resources in the manifest I use to create the users:

create_resources('ssh_authorized_key',hiera('ssh_keys'),{ user => $title })

But if I create more than one user I get this error:

Error: Duplicate declaration: Ssh_authorized_key[bob] is already declared on node <a href="http://debian-70rc1-x64-vbox4210-nocm.vagrantup.com">debian-70rc1-x64-vbox4210-nocm.vagrantup.com</a>

Can anyone please tell me a better way to do this or how I can perhaps add the username to ... (more)