Re:Ask HN: How do you manage SSH keys and SSL certificates i...
by drinchev on Friday May 12, 2017 @03:17AM
(#14322026)
How do you manage to "remove" SSH keys. Since sensible is stateless, you probably run once for removing and once for adding a new key.
[ Parent
| on HN ]
Re:Ask HN: How do you manage SSH keys and SSL certificates i...
by Spivak on Friday May 12, 2017 @08:37AM
(#14323423)
There are two states that we're talking about.
* Ensure that the following key is present.
* Ensure that only the following keys are present.
You can accomplish the second one with the 'exclusive' flag.
Re:Ask HN: How do you manage SSH keys and SSL certificates i...
by falcolas on Friday May 12, 2017 @09:08AM
(#14323633)
There's a third state as well: absent. Move keys from one file to another, and they go from allowed to denyed.
That said, I do like the "exclusive" tag too, I just tend to have a few one-off keys laying around as technical debt.
Re:Ask HN: How do you manage SSH keys and SSL certificates i...
by lamby on Friday May 12, 2017 @04:19AM
(#14322249)
Not the OP, but say you were populating a directory of keys, you would simply remove it via file's state=absent and then repopulate.
Re:Ask HN: How do you manage SSH keys and SSL certificates i...
by dkhenry on Friday May 12, 2017 @09:39AM
(#14323848)
You can have Ansible generate the authorized_keys file from a list of public key files, then when that list changes ansible will detect that the file has changed and will copy over the new file.