Skip to content
Snippets Groups Projects
Verified Commit d7f73e0e authored by nd's avatar nd
Browse files

Merge branch 'master' of git.cccv.de:infra/ansible/roles/ssh-initramfs

parents d3d917f0 6fb1bfd9
Branches master
No related tags found
No related merge requests found
ssh_initramfs:
copy_from_root: false
......@@ -12,6 +12,7 @@
group: root
- name: write authorized_keys file for dropbear-initramfs
when: not ssh_initramfs.copy_from_root
notify: update initramfs
template:
src: authorized_keys.j2
......@@ -19,3 +20,14 @@
mode: 0644
owner: root
group: root
- name: copy authorized_keys file from root user to dropbear-initramfs
when: ssh_initramfs.copy_from_root
notify: update initramfs
copy:
src: /root/.ssh/authorized_keys
dest: "{{ dropbear_initramfs_path }}/authorized_keys"
remote_src: true
mode: 0644
owner: root
group: root
dropbear_initramfs_path: "{% if ansible_distribution_release == 'bullseye' %}/etc/dropbear-initramfs/{% else %}/etc/dropbear/initramfs/{% endif %}"
dropbear_initramfs_config_path: "{{ dropbear_initramfs_path }}{% if ansible_distribution_release == 'bullseye' %}config{% else %}dropbear.conf{% endif %}"
dropbear_initramfs_path: "{% if (ansible_distribution_release|lower) in ['buster', 'bullseye'] %}/etc/dropbear-initramfs/{% else %}/etc/dropbear/initramfs/{% endif %}"
dropbear_initramfs_config_path: "{{ dropbear_initramfs_path }}{% if (ansible_distribution_release|lower) in ['buster', 'bullseye'] %}config{% else %}dropbear.conf{% endif %}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment