From c62cbeedcf19a52aa4165f9e798ab8922f1a4803 Mon Sep 17 00:00:00 2001 From: Joel Diaz Date: Thu, 3 Dec 2015 12:42:08 -0500 Subject: bring the docker udev workaround into openshift-ansible.git --- roles/docker/tasks/main.yml | 2 ++ roles/docker/tasks/udev_workaround.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 roles/docker/tasks/udev_workaround.yml (limited to 'roles/docker/tasks') 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 + -- cgit v1.2.3