summaryrefslogtreecommitdiff
path: root/ansible/roles
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-06-06 08:36:44 +0300
committerLars Wirzenius <liw@liw.fi>2023-06-06 08:36:44 +0300
commitb1fc1cdd1720ac495635fd469a78ae7ce899d5e4 (patch)
tree003a81454daecb29310cc0dc8a29671edec6df6c /ansible/roles
parent5dbb7b21ff66c19fff43ca1eaa3bc5977a9e7432 (diff)
downloadansibleness-b1fc1cdd1720ac495635fd469a78ae7ce899d5e4.tar.gz
fix: role liw: use lineinfile to add to known_hosts
Previously we replaced the whole file. Sponsored-by: author
Diffstat (limited to 'ansible/roles')
-rw-r--r--ansible/roles/liw/tasks/main.yml7
1 files changed, 3 insertions, 4 deletions
diff --git a/ansible/roles/liw/tasks/main.yml b/ansible/roles/liw/tasks/main.yml
index 2a0f9b9..01b90d7 100644
--- a/ansible/roles/liw/tasks/main.yml
+++ b/ansible/roles/liw/tasks/main.yml
@@ -9,10 +9,9 @@
sudo -u liw -i bash -c "ln -nsf liw-dot-files/gitconfig-exolobe1 .gitconfig"
- name: "configure liw SSH known hosts"
- copy:
- content: |
- @cert-authority * ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIW1QmBC3OLsjpUv1gIYBHSN5tWhPOHHzDIXgj8d1Hg1
- dest: /home/liw/.ssh/known_hosts
+ lineinfile:
+ line: "@cert-authority * ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIW1QmBC3OLsjpUv1gIYBHSN5tWhPOHHzDIXgj8d1Hg1"
+ path: /home/liw/.ssh/known_hosts
owner: liw
group: liw
mode: 0644