From d1d59768d9cdb90b8d53d1cd6d39534b0805301e Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Feb 21 2020 10:27:01 +0000 Subject: aws_cloud: conditionalize things by birthday --- diff --git a/tasks/aws_cloud.yml b/tasks/aws_cloud.yml index b5ea6bb..d7f5834 100644 --- a/tasks/aws_cloud.yml +++ b/tasks/aws_cloud.yml @@ -20,6 +20,7 @@ remote_user: fedora become: true become_user: root + when: birthday is defined - name: use the same authorized_keys replace: @@ -30,8 +31,11 @@ remote_user: fedora become: true become_user: root + when: birthday is defined - meta: reset_connection + when: birthday is defined + # from https://github.com/praiskup/ansible-role-fix-root-ssh #####################################################x @@ -94,6 +98,7 @@ local_action: command ssh-keyscan -t rsa {{ inventory_hostname }} ### ignore_errors: True register: hostkey + when: birthday is defined ### when: host_is_up is failed - name: add new ssh host key (until we can sign it) @@ -101,6 +106,7 @@ ### ignore_errors: True with_items: - /root/.ssh/known_hosts + when: birthday is defined ### when: host_is_up is failed #