
Данный Playbook отключает Swap и удаляет его из файла "/etc/fstab"
swap_disable.yaml
---
- name: Disable Swap
gather_facts: No
hosts: localhost
tasks:
- name: Disable SWAP
shell:
cmd: |
swapoff -a
args:
executable: /bin/bash
- name: Remove Swap from fstab
mount:
name: swap
fstype: swap
state: absent
Применяем Playbook:
ansible-playbook docker.yaml