Mohammed Naser | dc08739 | 2024-04-01 20:26:02 -0400 | [diff] [blame] | 1 | # 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 Naser | ec35aee | 2024-06-18 14:59:18 -0400 | [diff] [blame] | 19 | become: true |
Mohammed Naser | dc08739 | 2024-04-01 20:26:02 -0400 | [diff] [blame] | 20 | ansible.builtin.command: swapoff -a |
| 21 | ignore_errors: yes |
| 22 | |
Mohammed Naser | ec35aee | 2024-06-18 14:59:18 -0400 | [diff] [blame] | 23 | - 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 Naser | f75ab07 | 2024-04-02 12:55:10 -0400 | [diff] [blame] | 38 | # 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 Naser | b3454c2 | 2024-06-17 18:59:28 -0400 | [diff] [blame] | 45 | |
| 46 | - name: Configure Buildset Registry |
Mohammed Naser | 564caa8 | 2025-01-18 15:49:44 -0500 | [diff] [blame] | 47 | ansible.builtin.import_playbook: ../common/configure-ci-registry.yml |