camptocamp / puppet-accounts

11 stars 40 forks source link

'root' management? #44

Open mimmus opened 8 years ago

mimmus commented 8 years ago

Is it possible to manage 'root' account?

raphink commented 8 years ago

Yes, we do manage root with this module.

mimmus commented 8 years ago

May you provide me a hiera config to add a key for the 'root' user?

Thanks in advance

vdmkenny commented 6 years ago

Do we need to define "root" under accounts:users?

When I try to add authorized keys to my root users like this:

---
accounts::ssh_keys:
  kenny:
    type: ssh-rsa
    public: 'somekey'
  ben:
    type: ssh-rsa
    public: 'someotherkey'

accounts::users:
  root:
    uid: 0

and try to add keys like

class profile_base::pubkeys {
  accounts::account { 'root':
    authorized_keys => ['kenny', 'ben'],
  }

I get

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, has_key(): expects the first argument to be a hash, got "" which is of type String at /etc/puppetlabs/code/modules/accounts/manifests/account.pp:46:8