blob: ef5bc95cfc0ed3e1c4844aff8fe636ec70d570f8 [file] [log] [blame]
# Copyright (c) 2024 VEXXHOST, Inc.
#
# 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: Prepare host for Molecule tests
hosts: all
tasks:
- name: Disable swap
ansible.builtin.command: swapoff -a
ignore_errors: yes
# TODO(mnaser): Drop this when we can use https://github.com/vexxhost/atmosphere/pull/977
- name: Prefix all images for the job to point to mirror
ansible.builtin.shell: |
sed -i 's/ \(.*\): \(.*\)$/ \1: registry.atmosphere.dev\/\2/' roles/defaults/vars/main.yml
args:
chdir: "{{ zuul.project.src_dir }}"
# TODO(mnaser): Drop this when we move to PBR
- name: Add current folder to Git's safe directories
become: true
ansible.builtin.shell: |
git config --global --add safe.directory $(pwd)
args:
chdir: "{{ zuul.project.src_dir }}"