blob: 4d9dfedbcb20cdbeba450b48071c47b1e5e2b09c [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
Mohammed Naserec35aee2024-06-18 14:59:18 -040019 become: true
Mohammed Naserdc087392024-04-01 20:26:02 -040020 ansible.builtin.command: swapoff -a
21 ignore_errors: yes
22
Mohammed Naserec35aee2024-06-18 14:59:18 -040023 - name: Create /var/lib/etcd directory
24 become: true
25 ansible.builtin.file:
26 path: /var/lib/etcd
27 state: directory
28
29 - name: Mount ramdisk for /var/lib/etcd directory
30 become: true
31 ansible.posix.mount:
32 path: /var/lib/etcd
33 src: tmpfs
34 fstype: tmpfs
35 opts: nodev,nosuid,size=512M
36 state: mounted
37
Mohammed Naserf75ab072024-04-02 12:55:10 -040038 # TODO(mnaser): Drop this when we move to PBR
39 - name: Add current folder to Git's safe directories
40 become: true
41 ansible.builtin.shell: |
42 git config --global --add safe.directory $(pwd)
43 args:
44 chdir: "{{ zuul.project.src_dir }}"
Mohammed Naserb3454c22024-06-17 18:59:28 -040045
46- name: Configure Buildset Registry
Mohammed Naser564caa82025-01-18 15:49:44 -050047 ansible.builtin.import_playbook: ../common/configure-ci-registry.yml