Skip to content

Commit 35c4af9

Browse files
committedOct 27, 2017
Fixes #18
1 parent 41231a4 commit 35c4af9

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed
 

‎CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1111

1212
- Add support to ensure Docker is not upgraded ([#17](../../issues/17))
1313

14+
### Fixed
15+
16+
- /proc/sys/fs/may_detach_mounts does not exists in all kernel 3.10 versions ([#18](../../issues/18))
17+
1418
## [1.0.1](../../releases/tag/1.0.1) - 2017-10-22
1519

1620
### Fixed

‎tasks/main-CentOS.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,21 @@
3737
become: true
3838
when: yum_repo.changed
3939

40+
- name: Stat /proc/sys/fs/may_detach_mounts
41+
stat:
42+
path: /proc/sys/fs/may_detach_mounts
43+
register: may_detach_mounts
44+
4045
- name: Ensure fs.may_detach_mounts is set to avoid 'Device or resource busy'
4146
sysctl:
4247
name: fs.may_detach_mounts
4348
value: 1
4449
sysctl_file: /etc/sysctl.d/99-docker.conf
4550
reload: yes
4651
become: true
47-
when: ansible_kernel | version_compare('4', '<')
52+
when: ansible_kernel|version_compare('4', '<') and may_detach_mounts.stat.exists
4853

4954
- include: main-Mountflags.yml
50-
when: ansible_kernel | version_compare('4', '<')
55+
when: ansible_kernel|version_compare('4', '<')
5156

5257
- include: main-Generic.yml

0 commit comments

Comments
 (0)
Please sign in to comment.