https://github.com/qbit/ssh_pub
Ansible playbook for simple pubkey managemeng
https://github.com/qbit/ssh_pub
Last synced: 5 months ago
JSON representation
Ansible playbook for simple pubkey managemeng
- Host: GitHub
- URL: https://github.com/qbit/ssh_pub
- Owner: qbit
- Created: 2019-01-12T19:45:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-12T20:51:13.000Z (over 7 years ago)
- Last Synced: 2025-03-06T03:16:06.232Z (over 1 year ago)
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ssh_pub
=========
Manage ssh pub keys.
Role Variables
--------------
`ssh_pub` expects a data structure similar to the following:
```
pub_keys: {
"key_one": "ssh-rsa .....",
"key_two": "ssh-ed25519 ...."
"key_three": "ssh-ed25519 ...."
}
user_keys: {
user: {
keys: [
"key_one",
"key_two",
"key_three"
],
exclusive: true,
hosts: {
'host_two': {
excludes: [
"key_one"
]
},
'host_three': {
excludes: [
"key_one"
]
}
}
},
root: {
keys: [
"key_one"
],
exclusive: false,
hosts: {
'*': {
excludes: []
}
}
},
}
```
The hosts specified in `user_keys[user]['hosts']` must be `inventory_hostname`,
it also only lets you specify excludes. Any host not in the dict will get the
pubkeys specified in the `keys` array.
Example Playbook
----------------
- hosts: servers
roles:
- { role: qbit.ssh_pub }
License
-------
BSD