From a0b6fc7db1be2cf6190d982f90e96f4c39a4c699 Mon Sep 17 00:00:00 2001
From: Tobias Florek <tob@butter.sh>
Date: Wed, 23 Sep 2015 13:51:41 +0200
Subject: Initial containerization work from @ibotty

copied from https://github.com/eparis/kubernetes-ansible/blob/17f98edd7ff53e649b43e26822b8fbc0be42b233/roles/common/tasks/main.yml
---
 roles/docker/tasks/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'roles/docker')

diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml
index e94ebe3e1..7939221a1 100644
--- a/roles/docker/tasks/main.yml
+++ b/roles/docker/tasks/main.yml
@@ -1,7 +1,7 @@
 ---
 # tasks file for docker
 - name: Install docker
-  action: "{{ ansible_pkg_mgr }} name=docker state=present"
+  action: "{{ ansible_pkg_mgr }} name=docker state=present" and not is_atomic
   
 - name: enable and start the docker service
   service: name=docker enabled=yes state=started
-- 
cgit v1.2.3


From 8e7c5c970b8adc83fd6d5cad115f4edb06b36d98 Mon Sep 17 00:00:00 2001
From: Scott Dodson <sdodson@redhat.com>
Date: Mon, 5 Oct 2015 12:53:10 -0400
Subject: Containerization work by @sdodson

---
 roles/docker/README.md      |  2 +-
 roles/docker/tasks/main.yml | 12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

(limited to 'roles/docker')

diff --git a/roles/docker/README.md b/roles/docker/README.md
index 46f259eb7..6b5ee4421 100644
--- a/roles/docker/README.md
+++ b/roles/docker/README.md
@@ -1,4 +1,4 @@
-Role Name
+Docker
 =========
 
 Ensures docker package is installed, and optionally raises timeout for systemd-udevd.service to 5 minutes.
diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml
index 7939221a1..4e24fd3b3 100644
--- a/roles/docker/tasks/main.yml
+++ b/roles/docker/tasks/main.yml
@@ -1,10 +1,18 @@
 ---
 # tasks file for docker
 - name: Install docker
-  action: "{{ ansible_pkg_mgr }} name=docker state=present" and not is_atomic
+  action: "{{ ansible_pkg_mgr }} name=docker state=present"
+  when: not openshift.common.is_atomic | bool
   
 - name: enable and start the docker service
-  service: name=docker enabled=yes state=started
+  service:
+    name: docker
+    enabled: yes
+    state: started
+  register: start_result
+
+- set_fact:
+    docker_service_status_changed = start_result | changed
 
 - include: udev_workaround.yml
   when: docker_udev_workaround | default(False)
-- 
cgit v1.2.3


From 043d6b3a7e3c6b799ddf4157ccdf2b2b67451d81 Mon Sep 17 00:00:00 2001
From: Jason DeTiberus <jdetiber@redhat.com>
Date: Fri, 20 Nov 2015 15:45:39 -0500
Subject: fixes

---
 roles/docker/handlers/main.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'roles/docker')

diff --git a/roles/docker/handlers/main.yml b/roles/docker/handlers/main.yml
index 7d60f1891..9f827417f 100644
--- a/roles/docker/handlers/main.yml
+++ b/roles/docker/handlers/main.yml
@@ -1,7 +1,10 @@
 ---
 
 - name: restart docker
-  service: name=docker state=restarted
+  service:
+    name: docker
+    state: restarted
+  when: not docker_service_status_changed | default(false)
 
 - name: restart udev
   service:
-- 
cgit v1.2.3