Sha256: 4d2a6393197e74f71205823c6478c9645a5835bbae584908995dcb1be2da1c0c
Contents?: true
Size: 751 Bytes
Versions: 47
Compression:
Stored size: 751 Bytes
Contents
- name: Make zerod swap file command: dd if=/dev/zero of={{ swap_file.path }} bs=1024 count={{swap_file.size_kb}} creates={{ swap_file.path }} - name: Set swap permissions file: path={{ swap_file.path }} owner=root group=root mode=0600 - name: Check swap type command: file {{ swap_file.path }} register: swapfile_info changed_when: swapfile_info.stdout.find('swap file') == -1 - name: mkswap on swap file command: mkswap {{ swap_file.path }} when: swapfile_info.stdout.find('swap file') == -1 - name: Put the swap entry into fstab mount: name=none src={{ swap_file.path }} fstype=swap opts=sw passno=0 dump=0 state=present - name: Swapon swapfile command: swapon {{ swap_file.path }} when: ansible_swaptotal_mb < 1
Version data entries
47 entries across 47 versions & 1 rubygems