blob: 932838ee97864ea5207136a1c6d98c66e72b4a34 [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
become: true
ansible.builtin.command: swapoff -a
ignore_errors: yes
- name: Create /var/lib/etcd directory
become: true
ansible.builtin.file:
path: /var/lib/etcd
state: directory
- name: Mount ramdisk for /var/lib/etcd directory
become: true
ansible.posix.mount:
path: /var/lib/etcd
src: tmpfs
fstype: tmpfs
opts: nodev,nosuid,size=512M
state: mounted
# 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 }}"
- name: Configure Buildset Registry
ansible.builtin.import_playbook: ../common/configure-buildset-registry.yml