Don't set CA facts if ipsec is disabled

This commit is contained in:
Jack Ivanov 2019-05-23 17:03:18 +02:00
parent ecb4e555b4
commit 40b5404c59

View file

@ -51,14 +51,14 @@
include_vars: include_vars:
file: "configs/{{ algo_server }}/.config.yml" file: "configs/{{ algo_server }}/.config.yml"
- when: ipsec_enabled
block:
- name: CA password prompt - name: CA password prompt
pause: pause:
prompt: Enter the password for the private CA key prompt: Enter the password for the private CA key
echo: false echo: false
register: _ca_password register: _ca_password
when: when: ca_password is undefined
- ca_password is undefined
- ipsec_enabled
- name: Set facts based on the input - name: Set facts based on the input
set_fact: set_fact:
@ -78,7 +78,7 @@
ansible_ssh_user: "{{ server_user|default('root') }}" ansible_ssh_user: "{{ server_user|default('root') }}"
ansible_connection: "{% if algo_server == 'localhost' %}local{% else %}ssh{% endif %}" ansible_connection: "{% if algo_server == 'localhost' %}local{% else %}ssh{% endif %}"
ansible_python_interpreter: "/usr/bin/python3" ansible_python_interpreter: "/usr/bin/python3"
CA_password: "{{ CA_password }}" CA_password: "{{ CA_password|default(omit) }}"
rescue: rescue:
- include_tasks: playbooks/rescue.yml - include_tasks: playbooks/rescue.yml