AdvancedLinuxAdmin/ansible/playbooks/tasks/upload_image.yml
2022-04-07 01:33:15 -04:00

19 lines
585 B
YAML

---
- name: "[Upload Image] Download image - {{ item.filename }}"
ansible.builtin.get_url:
url: "{{ item.filename }}"
dest: "/tmp/{{ item.filename | checksum }}"
- name: Upload image to openstack
openstack.cloud.image:
cloud: linuxadminbooks
state: present
is_public: yes
name: "{{ item.name }}"
container_format: "{{ item.containerformat | default('bare') }}" #bare
disk_format: "{{ item.diskformat | default('qcow2') }}" # qcow2
filename: "/tmp/{{ item.filename | checksum }}"
tags:
- custom
properties: "{{ item.properties }}"