Commit 30eb7e6a authored by julian.gethmann's avatar julian.gethmann

Add root ssh key to authorized keys

parent 2b449f76
......@@ -51,3 +51,5 @@ userinstall_vars:
- {name: "bernhard", password: "$6$Q9NiWWvweGVfXXUP$6jhQWNGEs1f/RZc2aeDJ4Wv7huT5eAyW/uO0hOr8Yzi.h5Sa149LDpzp6utQI2VbnKF6O7TfpZeoKHFaNKGY51"}
admin_mail: gethmann@kit.edu
ansible_server: las126.las.kit.edu
......@@ -53,6 +53,14 @@
backup: yes
notify: restart sshd
- name: Add root key
become: yes
authorized_key:
user: root
state: present
key: "{{ lookup('file', '/root/.ssh/id_rsa.pub') }}"
key_options: 'from={{ ansible_server }}'
- name: Enable tunnel
lineinfile:
dest: /etc/ssh/sshd_config
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment