Transfer sesam access key to pi authorized keys
This commit is contained in:
parent
5495c93ed9
commit
bd99ebe684
1 changed files with 16 additions and 0 deletions
16
platon.yml
16
platon.yml
|
@ -70,11 +70,27 @@
|
|||
shell: /home/sesam/door-open.sh
|
||||
groups: i2c
|
||||
append: yes
|
||||
generate_ssh_key: yes
|
||||
|
||||
- name: Get the SSH public key for sesam
|
||||
ansible.builtin.slurp:
|
||||
src: /home/sesam/.ssh/id_rsa.pub
|
||||
register: sesam_key
|
||||
|
||||
- name: Add SSH public identity as authorized key to pi
|
||||
ansible.posix.authorized_key:
|
||||
user: "{{ gatekeeper_user }}"
|
||||
state: present
|
||||
key: "{{ sesam_key['content'] | b64decode }}"
|
||||
comment: "Sesam access"
|
||||
|
||||
- name: Copy door-open.ssh for sesam
|
||||
ansible.builtin.copy:
|
||||
src: files/platon/sesam-door-open.sh
|
||||
dest: /home/sesam/door-open.sh
|
||||
owner: sesam
|
||||
group: sesam
|
||||
mode: "0755"
|
||||
|
||||
|
||||
### Gatekeeper user (pi for now)
|
||||
|
|
Loading…
Reference in a new issue