summaryrefslogtreecommitdiff
path: root/roles/base/tasks/add_pubkeys.yaml
blob: 9f0e7c592bff77790d7f7449e3f9e9d019a7496e (plain)
1
2
3
4
5
6
7
8
9
---
- name: "add pubkeys to root user"
  ansible.builtin.lineinfile:
    path: /root/.ssh/authorized_keys
    create: true
    line: "{{ item | trim }}"
    search_string: "{{ (item | trim | split(' '))[2:-1]|join(' ') }}"
  when: "root_keys is defined"
  loop: "{{ root_keys }}"