Skip to content

Ansible role which configures GRUB to fix dockers - WARNING: No swap limit support

Notifications You must be signed in to change notification settings

Mtze/ansible-docker-swap-grub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Role Name

This role fixes the

WARNING: No swap limit support

warning in docker info by reconfiguring grub.

The docker documentation mentions this issue and describes how to solve it by reconfiguring grub.

TLDR:

This role updates /etc/defaults/grub to inclunde

GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"

Requirements

None

Role Variables

See defaults/main.yml.

Dependencies

None

Example Playbook

Update grub and reboot

- hosts: docker_hosts
  roles:
     - role: mtze.docker-swap-grub
       vars: 

Update grub and prevent reboot

- hosts: docker_hosts
  roles:
     - role: mtze.docker-swap-grub
       vars: 
         allow_reboot: false

License

MIT

About

Ansible role which configures GRUB to fix dockers - WARNING: No swap limit support

Resources

Stars

Watchers

Forks

Packages

No packages published