Przeglądaj źródła

docker role cleanup

- use service module for enabling/restarting docker service
- remove unused role directories/files
- use user module for adding the docker group to the root user
Jason DeTiberus 10 lat temu
rodzic
commit
70b03a84b1

+ 0 - 2
roles/docker/defaults/main.yml

@@ -1,2 +0,0 @@
----
-# defaults file for docker

+ 0 - 2
roles/docker/handlers/main.yml

@@ -1,2 +0,0 @@
----
-# handlers file for docker

+ 3 - 6
roles/docker/tasks/main.yml

@@ -3,16 +3,13 @@
 - name: Install docker
   yum: pkg=docker-io
 
-- name: enable docker service
-  command: /usr/bin/systemctl enable docker.service
-
-- name: start the docker service
-  command: /usr/bin/systemctl start docker.service
+- name: enable and start the docker service
+  service: name=docker enabled=yes state=started
 
 - copy: src=enter-container.sh dest=/usr/local/bin/enter-container.sh mode=0755
 
 # From the origin rpm there exists instructions on how to
 # setup origin properly.  The following steps come from there
 - name: Change root to be in the Docker group
-  command: usermod -G docker -a root
+  user: name=root groups=docker append=yes
 

+ 0 - 2
roles/docker/vars/main.yml

@@ -1,2 +0,0 @@
----
-# vars file for docker