diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-06-06 08:36:44 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-06-06 08:36:44 +0300 |
commit | b1fc1cdd1720ac495635fd469a78ae7ce899d5e4 (patch) | |
tree | 003a81454daecb29310cc0dc8a29671edec6df6c /ansible/roles | |
parent | 5dbb7b21ff66c19fff43ca1eaa3bc5977a9e7432 (diff) | |
download | ansibleness-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.yml | 7 |
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 |