diff options
Diffstat (limited to 'roles/docker')
-rwxr-xr-x | roles/docker/files/enter-container.sh | 13 | ||||
-rw-r--r-- | roles/docker/handlers/main.yml | 4 | ||||
-rw-r--r-- | roles/docker/tasks/main.yml | 9 |
3 files changed, 5 insertions, 21 deletions
diff --git a/roles/docker/files/enter-container.sh b/roles/docker/files/enter-container.sh deleted file mode 100755 index 7cf5b8d83..000000000 --- a/roles/docker/files/enter-container.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -if [ $# -ne 1 ] -then - echo - echo "Usage: $(basename $0) <container_name>" - echo - exit 1 -fi - -PID=$(docker inspect --format '{{.State.Pid}}' $1) - -nsenter --target $PID --mount --uts --ipc --net --pid diff --git a/roles/docker/handlers/main.yml b/roles/docker/handlers/main.yml new file mode 100644 index 000000000..eca7419c1 --- /dev/null +++ b/roles/docker/handlers/main.yml @@ -0,0 +1,4 @@ +--- + +- name: restart docker + service: name=docker state=restarted diff --git a/roles/docker/tasks/main.yml b/roles/docker/tasks/main.yml index ca700db17..96949230d 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/docker/tasks/main.yml @@ -1,15 +1,8 @@ --- # tasks file for docker - name: Install docker - yum: pkg=docker-io + yum: pkg=docker - 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 - user: name=root groups=dockerroot append=yes - |