torwachter: rm d3 key as he does no longer want access as told by ruru. Also better...
[noc.git] / ansible / remove_known_hosts.yml
index 5491342..abde3f5 100644 (file)
@@ -2,10 +2,10 @@
   hosts: localhost
   gather_facts: no
   tasks:
-    - command: ssh-keygen -f ~/.ssh/known_hosts -R [{{ item }}]:{{ hostvars[vmname].ansible_port }}
+    - command: ssh-keygen -f ~/.ssh/known_hosts -R [{{ item }}]:{{ hostvars[hostname].ansible_port }}
       with_items:
-        - "{{ hostvars[vmname].ansible_host }}"
-        - r3-{{ vmname }}
-        - r3g-{{ vmname }}
-        - r3e-{{ vmname }}
-        - "{{ hostvars[vmname].vm_network_cooked.primary.ip }}"
+        - "{{ hostvars[hostname].ansible_host }}"
+        - r3-{{ hostname }}
+        - r3g-{{ hostname }}
+        - r3e-{{ hostname }}
+        - "{{ hostvars[hostname].network_cooked.primary.ip }}"