Skip to content

Instantly share code, notes, and snippets.

View thoralfliersch's full-sized avatar

Thoralf Liersch thoralfliersch

View GitHub Profile
@thoralfliersch
thoralfliersch / DOCKER_remove_untagged_images
Last active May 15, 2017 11:51
DOCKER_remove_untagged_images
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
- name: ensure example.com is a known host
lineinfile:
dest: "{{ item }}"
create: yes
state: present
line: "{{ lookup('pipe', 'ssh-keyscan -H -t rsa example.com') }}"
with_items:
- /etc/ssh/ssh_known_hosts
- /root/.ssh/known_hosts
- /home/deploy/.ssh/known_hosts