blob: da548df0d818a8f023bace11d4df33b57b743b75 [file] [log] [blame]
- name: Apt Information
become: yes
apt: name={{ item }} state=latest force=yes
with_items:
- apt-transport-https
- ca-certificates
- name: Docker Apt Key
become: yes
apt_key:
keyserver: hkp://p80.pool.sks-keyservers.net:80
id: 58118E89F3A912897C070ADBF76221572C52609D
- name: Docker repository
become: yes
apt_repository:
repo: deb https://apt.dockerproject.org/repo ubuntu-trusty main
update_cache: yes
state: present
- name: Docker Engine
become: yes
apt:
name: docker-engine
state: latest
force: yes
- name: Docker Exposed vi TCP
become: yes
lineinfile:
dest=/etc/default/docker
state=present
insertafter='#DOCKER_OPTS'
line='DOCKER_OPTS="-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"'
register: docker_config
- name: Docker Restart
become: yes
service:
name=docker
state=restarted
when: docker_config.changed
- debug: msg="{{ ansible_user }}"
- name: Enable Docker for User
become: yes
user:
name={{ ansible_user }}
group=docker
append=yes
- name: Docker Compose
become: yes
get_url:
url=https://github.com/docker/compose/releases/download/1.7.1/docker-compose-Linux-x86_64
dest=/usr/local/bin/docker-compose
owner=root
group=root
mode=0755