Skip to content

Commit

Permalink
swapon: use a loopback device (ansible-community#156)
Browse files Browse the repository at this point in the history
Co-authored-by: Sorin Sbarnea <ssbarnea@redhat.com>
  • Loading branch information
2 people authored and apatard committed Jan 4, 2022
1 parent 923b680 commit be7979a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
5 changes: 3 additions & 2 deletions tools/test-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ set -euxo pipefail

sudo dd if=/dev/zero of=/swap.img bs=1024 count=1048576
sudo chmod 600 /swap.img
sudo mkswap /swap.img
sudo swapon /swap.img
sudo losetup -f /swap.img
sudo mkswap $(sudo losetup --associated /swap.img|sed 's,:.*,,')
sudo swapon $(sudo losetup --associated /swap.img|sed 's,:.*,,')

# Platforms coverage:
# Fedora 30 : has vagrant-libvirt no compilation needed
Expand Down
13 changes: 11 additions & 2 deletions tools/tox-py39/pre.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
---
- hosts: all
tasks:
- name: Ensure python3.9 is present
- name: Ensure python3.9 is present (Debian/Ubuntu)
become: true
package:
name: python
name: python3.9-devel
state: present
when: ansible_os_family != "RedHat"
- name: Ensure python3.9 is present (Red Hat)
become: true
package:
name:
- python3.9
- gcc
state: present
when: ansible_os_family == "RedHat"

0 comments on commit be7979a

Please sign in to comment.