Git initial commit
This commit is contained in:
commit
6bcf35137f
24 files changed
+790
No files matched your search
Executable
+35
@@ -0,0 +1,35 @@
|
||||
---
|
||||
- name: generate file for swapping
|
||||
command:
|
||||
cmd: "dd if=/dev/zero of={{ swap_file }} bs={{ swap_block_size }} count={{ swap_block_count }}"
|
||||
chdir: "/"
|
||||
creates: "{{ swap_file }}"
|
||||
register: swapfile_setup
|
||||
|
||||
- name: prepare swap file
|
||||
command:
|
||||
cmd: "mkswap {{ swap_file }}"
|
||||
chdir: "/"
|
||||
when: swapfile_setup.changed
|
||||
register: swapfile_creation
|
||||
|
||||
- name: set swap permission
|
||||
file:
|
||||
path: "{{ swap_file }}"
|
||||
mode: 0600
|
||||
|
||||
- name: activate swap
|
||||
command:
|
||||
cmd: "swapon {{ swap_file }}"
|
||||
chdir: "/"
|
||||
when: swapfile_creation.changed
|
||||
|
||||
- name: mount swap on boot
|
||||
mount:
|
||||
path: none
|
||||
src: "{{ swap_file }}"
|
||||
fstype: swap
|
||||
opts: sw
|
||||
passno: 0
|
||||
dump: 0
|
||||
state: present
|
||||
Reference in new issue
Block a user