Create known hosts for worker tasks

This commit is contained in:
Rolf Martin Glomsrud 2024-10-29 22:38:08 +01:00
parent 43e25de976
commit d0d20ecf66
3 changed files with 20 additions and 1 deletions

View file

@ -1,3 +1,5 @@
[defaults]
vault_password_file = .vault_password
forks = 30
host_key_checking = False
nocows=1

View file

@ -1,5 +1,4 @@
---
- name: Setup Forgejo actions
hosts:
- byggmester

View file

@ -99,3 +99,21 @@
state: started
enabled: true
become: true
- name: Create .ssh
ansible.builtin.file:
state: directory
owner: forgejo-runner
path: /home/forgejo-runner/.ssh
group: forgejo-runner
mode: "0755"
become: true
- name: Create known hosts
ansible.builtin.file:
state: touch
owner: forgejo-runner
path: /home/forgejo-runner/.ssh/known_hosts
group: forgejo-runner
mode: "0600"
become: true