mirror of
https://github.com/trailofbits/algo.git
synced 2025-09-02 10:03:01 +02:00
Skip a prompt about the SSH user if deploying to localhost
This commit is contained in:
parent
c40bfd1151
commit
356bc38a5f
1 changed files with 7 additions and 2 deletions
|
@ -5,16 +5,21 @@
|
|||
register: _algo_server
|
||||
when: server is undefined
|
||||
|
||||
- name: Set the facts
|
||||
set_fact:
|
||||
cloud_instance_ip: "{{ server | default(_algo_server.user_input) }}"
|
||||
|
||||
- pause:
|
||||
prompt: |
|
||||
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
|
||||
when:
|
||||
- ssh_user is undefined
|
||||
- cloud_instance_ip != "localhost"
|
||||
|
||||
- name: Set the facts
|
||||
set_fact:
|
||||
cloud_instance_ip: "{{ server | default(_algo_server.user_input) }}"
|
||||
ansible_ssh_user: >-
|
||||
{% if ssh_user is defined %}{{ ssh_user }}
|
||||
{%- elif _algo_ssh_user.user_input is defined and _algo_ssh_user.user_input != "" %}{{ _algo_ssh_user.user_input }}
|
||||
|
|
Loading…
Add table
Reference in a new issue