diff --git a/group_vars/all/vars.yml b/group_vars/all/vars.yml index 6dd4b3c..57a6d03 100644 --- a/group_vars/all/vars.yml +++ b/group_vars/all/vars.yml @@ -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 diff --git a/host_vars/beryllium.binary-kitchen.net b/host_vars/beryllium.binary-kitchen.net new file mode 100644 index 0000000..795781d --- /dev/null +++ b/host_vars/beryllium.binary-kitchen.net @@ -0,0 +1,5 @@ +--- + +root_keys_host: +- "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAB+wC+Lik9TNbRo40+e2BmJzJY8EuwRiJzKKvGCHlMmagOmZVf+zUmjc1uMvrgoA4UPJyKlkW1HqRhKLmsoccD2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ongL1BFO/QVLJqJKTT1TD/6FhEcGDRiXnsP43gg/w88K9nAaaaU5wupLF3laWoMKSoylaqmi8OtCdJ6Y9TmK01K8OBhsb558WYakunHdUjL9gdjDAZeS2yu8c0PJBkeX5hc8tQwpbPDGLfcCa1/Fg4+1+FhexQtkcXJhYHUoVpOPw39yX/3gSf9AWonRBjV7i4maorilFOudqp5wRKuNo0hfkSKYiWRpFD57q2NNpbr3+0DfYvNdRMiCQ== pajewski@MacBook-Pro.local" diff --git a/host_vars/nitrogen.binary-kitchen.net b/host_vars/nitrogen.binary-kitchen.net new file mode 100644 index 0000000..d5d8ddd --- /dev/null +++ b/host_vars/nitrogen.binary-kitchen.net @@ -0,0 +1,5 @@ +--- + +root_keys_host: +- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJu4xYKnnAhXf2Fe+cI+U4EVkePw3cbPbSR4iPhY2fQf xaver@xm.1drop.de" +- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGC1Cn/tEqpZKEgLzT3bGrhYibQy0bc21rtoDqm4+elZ xaver@home" diff --git a/roles/root-keys/tasks/main.yml b/roles/root-keys/tasks/main.yml new file mode 100644 index 0000000..5422b44 --- /dev/null +++ b/roles/root-keys/tasks/main.yml @@ -0,0 +1,4 @@ +--- + +- name: Set authorized keys + template: src=authorized_keys.j2 dest=/root/.ssh/authorized_keys diff --git a/roles/root-keys/templates/authorized_keys.j2 b/roles/root-keys/templates/authorized_keys.j2 new file mode 100644 index 0000000..bb9cc9e --- /dev/null +++ b/roles/root-keys/templates/authorized_keys.j2 @@ -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 %}