bifrost/playbooks/roles/bifrost-ironic-install/tasks/set_ssh_private_key.yml
Riccardo Pittau e4d0325b2f Fix error 601
Don't compare to literal True/False

Change-Id: I671978ac95de03d80b059d42f188e9fc9aecb4b4
2020-09-02 11:41:11 +02:00

17 lines
598 B
YAML

---
- name: "Defined ssh_private_key_path - Check to see if there is a file where the ssh_private_key_path is defined"
stat:
path: "{{ ssh_private_key_path }}"
register: test_ssh_private_key_path
delegate_to: localhost
- name: "Defined ssh_private_key_path - Error if ssh_private_key_path is not valid"
fail:
msg: "ssh_private_key_path is not valid."
when: not test_ssh_private_key_path.stat.exists
delegate_to: localhost
- name: "Defined ssh_private_key_path - Read SSH private key in"
set_fact: ssh_private_key="{{ lookup('file', ssh_private_key_path ) }}"
no_log: true