torwachter: rm d3 key as he does no longer want access as told by ruru. Also better...
[noc.git] / ansible / remove_known_hosts.yml
1 - name: Purge host from known hosts
2   hosts: localhost
3   gather_facts: no
4   tasks:
5     - command: ssh-keygen -f ~/.ssh/known_hosts -R [{{ item }}]:{{ hostvars[hostname].ansible_port }}
6       with_items:
7         - "{{ hostvars[hostname].ansible_host }}"
8         - r3-{{ hostname }}
9         - r3g-{{ hostname }}
10         - r3e-{{ hostname }}
11         - "{{ hostvars[hostname].network_cooked.primary.ip }}"