| regexp: "^{{ item.host_ip }}" |
| line: "{{ item.host_ip }} {{ item.host_name }}" |
| with_items: "{{ hosts }}" |
| - name: Latest apt packages |
| with_items: "{{ use_latest_for }}" |
| - name: Services are not running |
| with_items: "{{ obsolete_services }}" |
| - name: Ensure SSH directory exists |
| path: "{{ ansible_env['HOME'] }}/.ssh" |
| owner: "{{ ansible_env['SUDO_USER'] }}" |
| group: "{{ ansible_env['SUDO_USER'] }}" |
| - name: Ensure known_hosts file is absent |
| path: "{{ ansible_env['HOME'] }}/.ssh/known_hosts" |
| - name: Disable Known Host Checking |
| dest: "{{ ansible_env['HOME'] }}/.ssh/config" |
| owner: "{{ ansible_env['SUDO_USER'] }}" |
| group: "{{ ansible_env['SUDO_USER'] }}" |