summaryrefslogtreecommitdiffstats
path: root/roles/docker/tasks
diff options
context:
space:
mode:
authorJoel Diaz <jdiaz@redhat.com>2015-12-03 12:42:08 -0500
committerJoel Diaz <jdiaz@redhat.com>2015-12-04 11:43:34 -0500
commitc62cbeedcf19a52aa4165f9e798ab8922f1a4803 (patch)
tree2f7219a94bbb71de7032a59cb7f5965b4f553601 /roles/docker/tasks
parent15aa17c6162c036f6b164f225d2a071c138af965 (diff)
downloadopenshift-c62cbeedcf19a52aa4165f9e798ab8922f1a4803.tar.gz
openshift-c62cbeedcf19a52aa4165f9e798ab8922f1a4803.tar.bz2
openshift-c62cbeedcf19a52aa4165f9e798ab8922f1a4803.tar.xz
openshift-c62cbeedcf19a52aa4165f9e798ab8922f1a4803.zip
bring the docker udev workaround into openshift-ansible.git
Diffstat (limited to 'roles/docker/tasks')
-rw-r--r--roles/docker/tasks/main.yml2
-rw-r--r--roles/docker/tasks/udev_workaround.yml30
2 files changed, 32 insertions, 0 deletions
diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml
index dd4401389..857674454 100644
--- a/roles/docker/tasks/main.yml
+++ b/roles/docker/tasks/main.yml
@@ -11,3 +11,5 @@
- name: enable and start the docker service
service: name=docker enabled=yes state=started
+- include: udev_workaround.yml
+ when: docker_udev_workaround | default(False)
diff --git a/roles/docker/tasks/udev_workaround.yml b/roles/docker/tasks/udev_workaround.yml
new file mode 100644
index 000000000..3c236f698
--- /dev/null
+++ b/roles/docker/tasks/udev_workaround.yml
@@ -0,0 +1,30 @@
+---
+
+- name: Getting current systemd-udevd exec command
+ command: grep -e "^ExecStart=" /lib/systemd/system/systemd-udevd.service
+ changed_when: false
+ register: udevw_udev_start_cmd
+
+- name: Assure systemd-udevd.service.d directory exists
+ file:
+ path: "{{ udevw_udevd_dir }}"
+ state: directory
+
+- name: Create systemd-udevd override file
+ copy:
+ content: |
+ [Service]
+ #Need blank ExecStart to "clear" pre-exising one
+ ExecStart=
+ {{ udevw_udev_start_cmd.stdout }} --event-timeout=300
+ dest: "{{ udevw_udevd_dir }}/override.conf"
+ owner: root
+ mode: "0644"
+ notify:
+ - restart udev
+ register: udevw_override_conf
+
+- name: reload systemd config files
+ command: systemctl daemon-reload
+ when: udevw_override_conf | changed
+