diff --git a/roles/local/tasks/prompts.yml b/roles/local/tasks/prompts.yml index e71e9039..fa085ecd 100644 --- a/roles/local/tasks/prompts.yml +++ b/roles/local/tasks/prompts.yml @@ -19,6 +19,7 @@ What user should we use to login on the server? (note: passwordless login required, or ignore if you're deploying to localhost) [root] register: _algo_ssh_user + when: ssh_user is undefined - name: Set the facts set_fact: @@ -26,9 +27,7 @@ {% if ssh_user is defined %}{{ ssh_user }} {%- elif _algo_ssh_user.user_input %}{{ _algo_ssh_user.user_input }} {%- else %}root{% endif %} - when: - - ssh_user is undefined - - cloud_instance_ip != "localhost" + when: cloud_instance_ip != "localhost" - pause: prompt: |