-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
148 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
.vscode/ | ||
*.vdi | ||
/.project | ||
tests/yaml.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
files/etc/systemd/system/docker.service.d/mountflags-slave.conf
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Configuration to avoid 'Device or resource busy' | ||
- block: | ||
- name: Stat /proc/sys/fs/may_detach_mounts | ||
stat: | ||
path: /proc/sys/fs/may_detach_mounts | ||
register: may_detach_mounts | ||
|
||
- name: Ensure fs.may_detach_mounts is set to avoid 'Device or resource busy' | ||
sysctl: | ||
name: fs.may_detach_mounts | ||
value: 1 | ||
sysctl_file: /etc/sysctl.d/99-docker.conf | ||
reload: yes | ||
become: yes | ||
when: may_detach_mounts.stat.exists | ||
|
||
# - name: Copy systemd drop-in for Docker Mount Flags slave configuration to avoid 'Device or resource busy' | ||
# copy: | ||
# src: files/etc/systemd/system/docker.service.d/mountflags-slave.conf | ||
# dest: /etc/systemd/system/docker.service.d/mountflags-slave.conf | ||
# become: yes | ||
# notify: restart docker | ||
# when: docker_enable_mount_flag_fix | ||
|
||
# Keep for compatibility reasons of this role | ||
- name: Remove systemd drop-in for Docker Mount Flags slave configuration | ||
file: | ||
path: /etc/systemd/system/docker.service.d/mountflags-slave.conf | ||
state: absent | ||
become: yes | ||
notify: restart docker | ||
|
||
- name: Set systemd service MountFlags option to "slave" to prevent "device busy" errors on CentOS/RedHat 7.3 kernels | ||
set_fact: | ||
docker_systemd_service_config_tweaks: "{{ docker_systemd_service_config_tweaks + _systemd_service_config_tweaks }}" | ||
vars: | ||
_systemd_service_config_tweaks: | ||
- 'MountFlags=slave' | ||
|
||
when: (docker_enable_mount_flag_fix | bool) and (ansible_kernel | version_compare('4', '<')) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
- hosts: test-host | ||
vars: | ||
# Setting proxy environment variables to Docker daemon | ||
docker_systemd_service_config: | ||
- 'Environment="HTTP_PROXY=http://localhost:3128/" "NO_PROXY=localhost,127.0.0.1,docker-registry.somecorporation.com"' | ||
# Adding debug flag to Docker daemon | ||
docker_daemon_opts: '-D' | ||
roles: | ||
- haxorof.docker-ce |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters