cookbook 'ama-ssh-private-keys', '= 0.1.0'
ama-ssh-private-keys (5) Versions 0.1.0 Follow0
Manages SSH private keys
cookbook 'ama-ssh-private-keys', '= 0.1.0', :supermarket
knife supermarket install ama-ssh-private-keys
knife supermarket download ama-ssh-private-keys
Cookbook ama-ssh-private-keys
This cookbook allows end user to install private keys for specified
accounts.
Cookbook provides self-explanatory ssh_private_key
resource:
ssh_private_key 'id_rsa' do user 'jodie' private_key '-----BEGIN PRIVATE KEY-----...' public_key 'AAAAB3NzaC1kc...' passphrase 'i beg you pardon?' end
This will create id_rsa
and id_rsa.pub
in jodie's ~/.ssh
folder. If
jodie account doesn't exist yet, /home/jodie/.ssh
will be used (or
path specified in the resource - see below). If you are a super lazy
person, there's default
recipe that will take data bag with name
specified in ['ama']['ssh-private-keys']['data-bag']
attribute
('ssh-private-keys' by default) and iterate it's contents, creating a
new resource for each item.
By default, keys and passphrase are validated with ssh-keygen that
confirms that all components are what they are and match each other.
This may be turned off as well, if desired.
Cookbook is tested against Debian 7.3+, Ubuntu 14.04+, Centos 6.0+
and Fedora 24+, but generally it should work everywhere.
Full resource specification
ssh_private_key 'hackerman:default' do id 'id_rsa' # name_property user 'hackerman' # required private_key '' # required public_key '' passphrase 'choose life' parent_directory '/workspace' private_key_mode '0600' public_key_mode '0644' public_key_suffix '.pub' comment 'hack-the-time' perform_validation true end
Licensing
MIT License / AMA Team
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog
and this project adheres to Semantic Versioning.
[0.1.0] - 2017-06-20
Added
- Initial implementation