mirror of
https://github.com/koodiklinikka/playbooks.git
synced 2026-01-26 11:14:04 +00:00
65 lines
1.3 KiB
YAML
65 lines
1.3 KiB
YAML
---
|
|
- name: Install lxc-docker
|
|
apt:
|
|
pkg: "linux-image-{{ ansible_kernel }}"
|
|
state: installed
|
|
|
|
- name: Add Ubuntu universe repo for pip
|
|
apt_repository:
|
|
repo: "deb http://mirrors.digitalocean.com/ubuntu trusty universe"
|
|
update_cache: yes
|
|
state: present
|
|
|
|
- name: Install pip
|
|
apt:
|
|
pkg: "{{ item }}"
|
|
state: installed
|
|
with_items:
|
|
- python-dev
|
|
|
|
- name: install pip
|
|
shell: easy_install -U pip
|
|
sudo: yes
|
|
|
|
- name: Install Docker-py
|
|
pip:
|
|
name: docker-py
|
|
|
|
- name: Make sure apt-transport-https is installed
|
|
apt:
|
|
pkg: "apt-transport-https"
|
|
state: installed
|
|
|
|
- name: Add Docker repository key
|
|
apt_key:
|
|
id: "36A1D7869245C8950F966E92D8576A8BA88D21E9"
|
|
keyserver: "hkp://keyserver.ubuntu.com:80"
|
|
state: present
|
|
|
|
- name: Add Docker repository and update apt cache
|
|
apt_repository:
|
|
repo: "deb http://get.docker.io/ubuntu docker main"
|
|
update_cache: yes
|
|
state: present
|
|
|
|
- name: Install lxc-docker
|
|
apt:
|
|
pkg: "lxc-docker"
|
|
state: installed
|
|
|
|
- name: Set docker daemon options
|
|
copy:
|
|
content: "DOCKER_OPTS=\"{{ docker_opts.rstrip('\n') }}\""
|
|
dest: /etc/default/docker
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify:
|
|
- Reload docker
|
|
when: docker_opts != ""
|
|
|
|
- name: Start docker-lxc
|
|
service:
|
|
name: docker
|
|
state: started
|