From 40a145dac6fde5abf13a0692f5991d0abf541078 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Fri, 23 Apr 2021 11:47:35 +0200 Subject: [PATCH] copr-hv: swap space --- roles/copr/hypervisor/tasks/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/roles/copr/hypervisor/tasks/main.yml b/roles/copr/hypervisor/tasks/main.yml index d71b4c977a..97704346c1 100644 --- a/roles/copr/hypervisor/tasks/main.yml +++ b/roles/copr/hypervisor/tasks/main.yml @@ -1,4 +1,16 @@ --- +- name: enable swap in fstab + mount: name=none src=LABEL=swap + fstype=swap opts=sw passno=0 dump=0 + state=present + register: fstab_swap_entry + tags: swap + +- name: mount the swap + shell: swapon -a + when: fstab_swap_entry.changed + tags: swap + - name: create the copr user user: name=copr uid=11666