ansible_ssh_user fact fix

This commit is contained in:
Jack Ivanov 2019-04-29 10:15:36 +02:00
parent 92948ec45e
commit 9fc1fed8cf

View file

@ -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: |