From 2e0b1116606bf8afe2bb576a8e0799c1a48e8121 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 10 Oct 2017 19:39:36 +0000 Subject: [PATCH] make this when defined --- roles/basessh/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/basessh/tasks/main.yml b/roles/basessh/tasks/main.yml index 15aafd2c38..e394d95968 100644 --- a/roles/basessh/tasks/main.yml +++ b/roles/basessh/tasks/main.yml @@ -10,20 +10,20 @@ ignore_errors: True with_items: - /root/.ssh/known_hosts - when: birthday is true + when: birthday is defined - name: gather ssh host key from new instance local_action: command ssh-keyscan -t rsa {{ inventory_hostname }} ignore_errors: True register: hostkey - when: birthday is true + when: birthday is defined - name: add new ssh host key (until we can sign it) local_action: known_hosts path={{item}} key="{{ hostkey.stdout }}" host={{ inventory_hostname }} state=present ignore_errors: True with_items: - /root/.ssh/known_hosts - when: birthday is true + when: birthday is defined - name: check if sshd port is already known by selinux shell: semanage port -l | grep ssh