Commit e6bbb5d
Lorenzo Zolfanelli
server_ssh: do not overwrite existing user ca if not managed by ansible
Only one key is managed by Ansible at time, if not-managed keys are
present in user_ca.pub they are not removed, but the new key is
appended to the file.
If the ansible-managed key is changed it is overwritten.
The ansible-managed key is detected using a leadind tag in the key
line in user_ca.pub.
Maybe it would be best to have a "key" version parameter and variable
with options to enable key rotation/revocation.
Anyway it provides an easy way to push new user ca while machine already
configured with previous version of this role will still accept login
from user with certificate issued from the older cas.1 parent e0f1d25 commit e6bbb5d
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
0 commit comments