--- # Copyright Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. - name: Ensure needed directories exist ansible.builtin.file: path: "{{ cifmw_nat64_appliance_basedir }}/{{ item }}" state: directory mode: "0755" loop: - artifacts - logs - name: Ensure working directory exists ansible.builtin.file: path: "{{ cifmw_nat64_appliance_workdir }}/tmp" state: directory mode: "0755" - name: Build NAT64 appliance image from source when: - cifmw_nat64_appliance_image_url | length == 0 ansible.builtin.include_tasks: build_image.yml - name: Download pre-built NAT64 appliance image when: - cifmw_nat64_appliance_image_url | length > 0 ansible.builtin.get_url: url: "{{ cifmw_nat64_appliance_image_url }}" dest: "{{ cifmw_nat64_appliance_workdir }}/nat64-appliance.qcow2" checksum: "{{ cifmw_nat64_appliance_image_checksum | default(omit) }}" timeout: "{{ cifmw_nat64_appliance_download_timeout }}" mode: "0644"