pubkey: Common configuration
pubkey::ssh: Generate ssh key pair and exports public ssh key
pubkey::keygen: Internal class to validate detected parameters
Pubkey::Type: Supported ssh key types
Common configuration
include pubkeyThe following parameters are available in the pubkey class:
Data type: String
Owner of the cache directory
Data type: String
Group of the cache directory
Data type: Boolean
Whether manage directory for exported keys. Note in order to disable
pubkey::ssh::export_key should be set to false on each key.
Exports public ssh key to Puppetserver
pubkey::ssh { 'john_rsa': }pubkey::ssh { 'johndoe':
type => 'ed25519',
comment => 'johndoe_ed25519',
tags => ['users'],
}pubkey::ssh { 'bob_ed25519':
user => 'bob', # auto-detected from title
target_user => 'deploy', # user account under which authorized key will be stored
tags => ['users'],
}The following parameters are available in the pubkey::ssh defined type:
Data type: Boolean
Whether missing key should be generated
Default value: true
Data type: Optional[String[1]]
account name where ssh key is (optionally) generated and public key stored into exported resource
Default value: undef
Data type: Optional[String[1]]
account name under which we will store the authorized key (by default same as user)
Default value: undef
Data type: Optional[Pubkey::Type]
ssh key type one of: 'dsa', 'rsa', 'ecdsa', 'ed25519', 'ecdsa-sk', 'ed25519-sk'
Default value: undef
Data type: Optional[Stdlib::UnixPath]
user's home directory, assuming .ssh is located in $HOME/.ssh
Default value: undef
Data type: Optional[String[1]]
custom key file prefix for the ssh key file (default: 'id')
Default value: undef
Data type: Optional[String[1]]
ssh key's comment
Default value: undef
Data type: Optional[Integer]
number of bits for generated ssh key
Default value: undef
Data type: Optional[Array[String]]
optional tags added to the exported key
Default value: undef
Data type: Boolean
whether export the generated key (default: true)
Default value: true
Data type: Stdlib::AbsolutePath
standard unix path to look for ssh-keygen
Default value: $facts['path']
Data type: String
that will be part of exported resource
Default value: $facts['networking']['fqdn']
Data type: String[1]
A character for user and type auto-detection (default: '_')
Default value: '_'
Supported ssh key types
Alias of Enum['dsa', 'rsa', 'ecdsa', 'ed25519', 'ecdsa-sk', 'ed25519-sk']