This roles configures SWAP memory.
This role is designed to work with merge "hash_behaviour". Make sure your ansible.cfg contains these settings
[defaults]
hash_behaviour = mergeThis role has no dependencies
This role uses two tags: build and configure
build- Creates swap file and configures system to use it.configure- does nothing, kept for compatibility with 1.9 (missing tags causes errors)
To simply add swap to your server:
- name: Add swap memory to the server
hosts: sandbox
pre_tasks:
- name: Update apt
become: yes
command: apt-get update
tags:
- build
roles:
- role: ansible-city.swap