Added task to set SSH key permission

This commit is contained in:
Opnxng 2023-11-15 03:08:19 +08:00
parent c581d1536a
commit 96e0eb3884
1 changed files with 7 additions and 0 deletions

View File

@ -41,3 +41,10 @@
manage_dir: '{{ should_manage_dir }}'
key: "{{ ssh_deployment_key }}"
- name: Set ownership and permissions for SSH private key
ansible.builtin.file:
path: '/home/{{ ssh_host_user }}/{{ ssh_key_path }}'
owner: 1000
group: 1000
mode: 0600
delegate_to: localhost