Use fqdn for ansible.builtin modules

This commit is contained in:
2025-11-15 21:49:12 +01:00
parent ec2b3b7edc
commit ff691bae3d
8 changed files with 101 additions and 101 deletions

View File

@@ -2,20 +2,20 @@
# download-image.yml - Download and cache Debian GenericCloud image
- name: "[IMAGE] Check for Debian GenericCloud image"
stat:
ansible.builtin.stat:
path: "{{ debian_image_path }}"
register: debian_img
changed_when: false
- name: "[IMAGE] Create template directory if missing"
file:
ansible.builtin.file:
path: "/var/lib/vz/template/qemu"
state: directory
mode: "0755"
when: not debian_img.stat.exists
- name: "[IMAGE] Download Debian GenericCloud qcow2"
get_url:
ansible.builtin.get_url:
url: "{{ debian_image_url }}"
dest: "{{ debian_image_path }}"
mode: "0644"
@@ -27,14 +27,14 @@
when: not debian_img.stat.exists
- name: "[IMAGE] Verify downloaded image integrity"
stat:
ansible.builtin.stat:
path: "{{ debian_image_path }}"
register: debian_img_final
changed_when: false
failed_when: not debian_img_final.stat.exists or debian_img_final.stat.size == 0
- name: "[IMAGE] Display image info"
debug:
ansible.builtin.debug:
msg: |
Image cached at: {{ debian_image_path }}
Size: {{ debian_img_final.stat.size | int / 1024 / 1024 / 1024 | round(2) }} GB