blob: ef5bc95cfc0ed3e1c4844aff8fe636ec70d570f8 [file] [log] [blame]
Mohammed Naserdc087392024-04-01 20:26:02 -04001# Copyright (c) 2024 VEXXHOST, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
15- name: Prepare host for Molecule tests
16 hosts: all
17 tasks:
18 - name: Disable swap
19 ansible.builtin.command: swapoff -a
20 ignore_errors: yes
21
22 # TODO(mnaser): Drop this when we can use https://github.com/vexxhost/atmosphere/pull/977
23 - name: Prefix all images for the job to point to mirror
24 ansible.builtin.shell: |
25 sed -i 's/ \(.*\): \(.*\)$/ \1: registry.atmosphere.dev\/\2/' roles/defaults/vars/main.yml
26 args:
27 chdir: "{{ zuul.project.src_dir }}"
Mohammed Naserf75ab072024-04-02 12:55:10 -040028
29 # TODO(mnaser): Drop this when we move to PBR
30 - name: Add current folder to Git's safe directories
31 become: true
32 ansible.builtin.shell: |
33 git config --global --add safe.directory $(pwd)
34 args:
35 chdir: "{{ zuul.project.src_dir }}"