summaryrefslogtreecommitdiff
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
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
-rw-r--r--ansible/roles/liw/tasks/main.yml7
-rw-r--r--ansible/upliw.yml2
2 files changed, 4 insertions, 5 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
diff --git a/ansible/upliw.yml b/ansible/upliw.yml
index 0c0063e..ac887d2 100644
--- a/ansible/upliw.yml
+++ b/ansible/upliw.yml
@@ -14,7 +14,7 @@
- role: gnome-system
- role: vmhost
- role: unix_users
-# - role: liw
+ - role: liw
- role: rust-rustup
- role: smarthost-client