Debian Codegraph @

tests/image_prep/roles/container_host/tasks/main.yml

raw
1 # > If running `docker run --rm -it centos:centos6.7 bash` immediately exits
2 # > with status code 139, check to see if your system has disabled vsyscall:
3 # > ...
4 # > If you do not see a vsyscall mapping, and you need to run a CentOS 6
5 # > container, try adding vsyscall=emulated to the kernel options.
6 # > -- https://hub.docker.com/_/centos
7
8 - name: Check vsyscall enabled
9 command:
10 cmd: grep -c vsyscall /proc/self/maps
11 register: grep_self_maps_result
12 changed_when: false
13 check_mode: false
14 failed_when:
15 # 0 -> match, 1 -> no match, 2 -> error
16 - grep_self_maps_result.rc not in [0, 1]
17
18 - name: Enable vsyscall
19 lineinfile:
20 path: /etc/default/grub
21 regexp: '^GRUB_CMDLINE_LINUX_DEFAULT.+'
22 line: GRUB_CMDLINE_LINUX_DEFAULT="quiet vsyscall=emulate"
23 when:
24 - grep_self_maps_result.rc != 0
25 notify:
26 - Update GRUB
27 - Reboot