Ask Your Question

puppet 3.85 - sshkey Could not evaluate: Field 'type' is required

asked 2016-09-06 09:50:07 -0600

dan.wall gravatar image

In an attempt to debug my default.pp file, I've now reduced it to this:

sshkey { 'ssh-keys-dw80':
  type => 'rsa',
  ensure => present,
  name => '',
  key => 'srt5',

I had the same error with a valid key but I also tried replacing the key with whats above just to rule out any issues with special chars in the keys. Despite this very simple puppet file I still get this error:

/Stage[main]/Main/Sshkey[ssh-keys-dw80]: Could not evaluate: Field 'type' is required

Im running via vagrant with a windows 10 host running against a ubuntu 16.04 guest box in virtualbox, I've use the apt repository version of puppet which is held at 3.8.5. Any ideas what I'm doing wrong here or is this a bug in the release I'm using?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-09-07 02:10:06 -0600

lupin gravatar image

You need to pass a valid value for the type attibute. List of valid values. So for your case(ssh-rsa) it would look like this.

sshkey { 'ssh-keys-dw80':
  type => 'ssh-rsa',
  ensure => present,
  name => '',
  key => 'actual-long-string-keys'
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-09-05 11:21:40 -0600

Seen: 246 times

Last updated: Sep 07 '16