root-keys: new role to set ssh authorized keys for the root user
This commit is contained in:
parent
0a2f85459d
commit
1a511a9faf
@ -65,6 +65,12 @@ racktables_dbpass: "{{ vault_racktables_dbpass }}"
|
||||
|
||||
radius_secret: "{{ vault_radius_secret }}"
|
||||
|
||||
root_keys:
|
||||
- "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC1McRltT0B2bAN1pVDQ+ApJL/rhnvu9gAyGamXwGAgt3V5Q/+VT+KY+0x2T5kgPsuBOio/SDKPY6zoadomU+l3QXtfiE797j7rOjHrIUJor6fMubpVg8jU9E9pytN/vgYSVy286hLmTnHNjTZYlwhMCFA2xAJfyutypY0igAlUh6NNL3PK0LRESd12ttavDX65R2zZpJqBTcKZEXt8y1D+YArxmAa09cS9X4SH8z5h1HWHJ3G60U2nIrdPegADnUXitL5Fup5xok89B4zpILRXz9PmnLXHCTXLu4DamIFPbObnXyjT9gsSMAkOUc6m8TzVgek/7ImL/hQiZU2woQ9p moepman"
|
||||
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJBmZnJLG1WRppbLtOAJw3E4LgLRK0NirfCgpovhhU6h moepman"
|
||||
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIETMJ1JTX+xKC7ML8Or+8wunwy1rjIkp7MfeZLzLIyvP tomoto"
|
||||
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINPlktM2x11cNBMKurf57MLE1XcOm2sGQXguc0tl1vYd rudi@helheim"
|
||||
|
||||
snmp_allowed:
|
||||
- 172.23.2.5
|
||||
- 172.23.2.6
|
||||
|
5
host_vars/beryllium.binary-kitchen.net
Normal file
5
host_vars/beryllium.binary-kitchen.net
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
|
||||
root_keys_host:
|
||||
- "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAB+wC+Lik9TNbRo40+e2BmJzJY8EuwRiJzKKvGCHlMmagOmZVf+zUmjc1uMvrgoA4UPJyKlkW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lMsIdgpn6+YOzzdPhDongL1BFO/QVLJqJKTT1TD/6FhEcGDRiXnsP43gg/w88K9nAaaaU5wupLF3laWoMKSoylaqmi8OtCdJ6Y9TmK01K8OBhsb558WYakunHdUjL9gdjDAZeS2yu8c0PJBkeX5hc8tQwpbPDGLfcCa1/Fg4+1+FhexQtkcXJhYHUoVpOPw39yX/3gSf9AWonRBjV7i4maorilFOudqp5wRKuNo0hfkSKYiWRpFD57q2NNpbr3+0DfYvNdRMiCQ== pajewski@MacBook-Pro.local"
|
5
host_vars/nitrogen.binary-kitchen.net
Normal file
5
host_vars/nitrogen.binary-kitchen.net
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
|
||||
root_keys_host:
|
||||
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJu4xYKnnAhXf2Fe+cI+U4EVkePw3cbPbSR4iPhY2fQf xaver@xm.1drop.de"
|
||||
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGC1Cn/tEqpZKEgLzT3bGrhYibQy0bc21rtoDqm4+elZ xaver@home"
|
4
roles/root-keys/tasks/main.yml
Normal file
4
roles/root-keys/tasks/main.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
|
||||
- name: Set authorized keys
|
||||
template: src=authorized_keys.j2 dest=/root/.ssh/authorized_keys
|
10
roles/root-keys/templates/authorized_keys.j2
Normal file
10
roles/root-keys/templates/authorized_keys.j2
Normal file
@ -0,0 +1,10 @@
|
||||
{% if root_keys %}
|
||||
{% for key in root_keys %}
|
||||
{{ key }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if root_keys_host is defined %}
|
||||
{% for key in root_keys_host %}
|
||||
{{ key }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
Loading…
Reference in New Issue
Block a user