aboutsummaryrefslogtreecommitdiffstats
path: root/supporting/servers/roles/docker/tasks/main.yml
diff options
context:
space:
mode:
authorzhifeng.jiang <jiang.zhifeng@zte.com.cn>2016-11-02 22:28:26 +0800
committerzhifeng.jiang <jiang.zhifeng@zte.com.cn>2016-11-03 15:58:28 +0800
commit44b306376ddd425acdb64a36fe77dfe7a9992a93 (patch)
treebca58b037b724b7e0c3d386b93a3ea5605367135 /supporting/servers/roles/docker/tasks/main.yml
parentcdd2320235e1fec0b883dc79b8f2cbd5d931cede (diff)
Fix ansible Syntax Error while loading YAML and separates
docker,elk and nginx installing file. JIRA:QTIP-111 Change-Id: I8fe004b0edc86729e1beff07b406b568af60da89 Signed-off-by: zhifeng.jiang <jiang.zhifeng@zte.com.cn>
Diffstat (limited to 'supporting/servers/roles/docker/tasks/main.yml')
-rw-r--r--supporting/servers/roles/docker/tasks/main.yml39
1 files changed, 39 insertions, 0 deletions
diff --git a/supporting/servers/roles/docker/tasks/main.yml b/supporting/servers/roles/docker/tasks/main.yml
new file mode 100644
index 00000000..881650dd
--- /dev/null
+++ b/supporting/servers/roles/docker/tasks/main.yml
@@ -0,0 +1,39 @@
+- name: adding keys
+ become: true
+ apt_key: keyserver=hkp://p80.pool.sks-keyservers.net id=0X58118E89F3A912897C070ADBF76221572C52609D
+
+- name: adding entry for ubuntu
+ become: true
+ apt_repository: repo='deb https://apt.dockerproject.org/repo ubuntu-xenial main' state=present filename='docker'
+ when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "16.04"
+
+- name: installing from docker repo
+ become: true
+ shell: apt-cache policy docker-engine
+ when: ansible_distribution == "Ubuntu" and ansible_distribution_version== "16.04"
+
+- name: adding entry for ubuntu
+ become: true
+ apt_repository: repo='deb https://apt.dockerproject.org/repo ubuntu-trusty main' state=present filename='docker'
+ when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "14.04"
+
+- name: updating
+ become: true
+ apt: update_cache=yes
+
+- name: installing docker engine
+ become: true
+ apt: name=docker-engine
+ notify:
+ - starting docker service
+
+- name: install pip
+ apt: pkg={{item}} state=installed
+ with_items:
+ - python-dev
+ - python-pip
+
+- name: install docker-py
+ pip:
+ name: docker-py
+