48 dest: "{{user.home}}/.ssh/known_hosts" |
48 dest: "{{user.home}}/.ssh/known_hosts" |
49 state: present |
49 state: present |
50 line: "{{item.value}}" |
50 line: "{{item.value}}" |
51 create: true |
51 create: true |
52 mode: 0600 |
52 mode: 0600 |
53 with_dict: hostkeys |
53 with_dict: "{{hostkeys}}" |
54 tags: user, ssh |
54 tags: user, ssh |
55 |
55 |
56 - name: ssh | Purge invalid known_hosts keys |
56 - name: ssh | Purge invalid known_hosts keys |
57 become: true |
57 become: true |
58 become_user: "{{user.name}}" |
58 become_user: "{{user.name}}" |
59 lineinfile: |
59 lineinfile: |
60 dest: "{{user.home}}/.ssh/known_hosts" |
60 dest: "{{user.home}}/.ssh/known_hosts" |
61 state: absent |
61 state: absent |
62 line: "{{item.value}}" |
62 line: "{{item.value}}" |
63 with_dict: hostkeys_removed |
63 with_dict: "{{hostkeys_removed}}" |
64 tags: user, ssh |
64 tags: user, ssh |
65 |
65 |
66 |
66 |
67 # I like to make my ~ my dotfiles working directory (some folks symlink |
67 # I like to make my ~ my dotfiles working directory (some folks symlink |
68 # everything) Here that means I clone, move hg, then checkout, clobbering any |
68 # everything) Here that means I clone, move hg, then checkout, clobbering any |