-
Notifications
You must be signed in to change notification settings - Fork 1
/
playbook.yml
36 lines (35 loc) · 1.06 KB
/
playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
- hosts: app
become: true
tasks:
- name: asegurarse que la llave del repositorio de docker está instalada
apt_key:
id: "58118E89F3A912897C070ADBF76221572C52609D"
keyserver: "hkp://p80.pool.sks-keyservers.net:80"
state: present
- name: asegurarse que el repositorio de docker esté disponible en el SO
# Para Ubuntu 14.04 LTS, usar este repositorio:
apt_repository:
repo: deb https://apt.dockerproject.org/repo ubuntu-trusty main
state: present
update_cache: yes
# Instalar Docker
- name: instalar Docker
apt:
name: docker-engine
state: present
# Instalar Docker-compose
- name: instalar docker-compose
pip:
name=docker-compose
state=present
# Iniciar Servicio de Docker
- name: iniciar Docker
service:
name=docker
state=restarted
#- name: ejecutar conenedores docker usando el directorio de un proyecto
- docker_service:
project_src: compose
state: present
register: output