modified: tasks/preflight-checks.yml
This commit is contained in:
@@ -39,13 +39,29 @@
|
|||||||
msg: "Storage pool '{{ storage }}' not found. Available pools: run 'pvesm status'"
|
msg: "Storage pool '{{ storage }}' not found. Available pools: run 'pvesm status'"
|
||||||
when: storage_check.rc != 0
|
when: storage_check.rc != 0
|
||||||
|
|
||||||
|
- name: Combine SSH public keys into one file
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: '{{ ssh_keys_file }}'
|
||||||
|
content: |
|
||||||
|
{% for key in ssh_public_keys %}
|
||||||
|
{{ key }}
|
||||||
|
{% endfor %}
|
||||||
|
mode: '0644'
|
||||||
|
|
||||||
- name: "[PREFLIGHT] Check SSH key file exists"
|
- name: "[PREFLIGHT] Check SSH key file exists"
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: "{{ ssh_key_path | expanduser }}"
|
path: "{{ ssh_keys_file | expanduser }}"
|
||||||
register: ssh_key_file
|
register: ssh_key_file
|
||||||
failed_when: not ssh_key_file.stat.exists
|
failed_when: not ssh_key_file.stat.exists
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
|
# - name: "[PREFLIGHT] Check SSH key file exists"
|
||||||
|
# ansible.builtin.stat:
|
||||||
|
# path: "{{ ssh_key_path | expanduser }}"
|
||||||
|
# register: ssh_key_file
|
||||||
|
# failed_when: not ssh_key_file.stat.exists
|
||||||
|
# changed_when: false
|
||||||
|
|
||||||
- name: "[PREFLIGHT] Validate VM ID is unique"
|
- name: "[PREFLIGHT] Validate VM ID is unique"
|
||||||
ansible.builtin.command: "test ! -f /etc/pve/qemu-server/{{ vm_id }}.conf"
|
ansible.builtin.command: "test ! -f /etc/pve/qemu-server/{{ vm_id }}.conf"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|||||||
Reference in New Issue
Block a user