forked from mozilla-iam/packer-gold
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yml
87 lines (70 loc) · 2.53 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
- hosts: localhost
name: configuration
user: ec2-user
become: yes
become_user: root
gather_facts: true
tasks:
- name: Install python setup tools
yum: name=python-setuptools
tags: docker
- name: Install git
yum: name=git
tags: docker
- name: Install Pypi
easy_install: name=pip
tags: docker
- name: Install docker-py
pip: name=docker-py
tags: docker
- name: Install Docker
yum: name=docker state=latest
tags: docker
- name: Ensure ec2-user is member of docker group
user:
name=ec2-user
groups=wheel,docker
- name: Make sure Docker is running
service: name=docker state=running enabled=yes
tags: docker
- name: Install -> Docker-Compose
sudo: yes
get_url:
url=https://github.com/docker/compose/releases/download/1.11.2/docker-compose-Linux-x86_64
dest=/usr/local/bin/docker-compose
mode=0755
- name: setup directory for mozilla-projects
sudo: yes
file:
path=/opt/mozilla-projects
state=directory
mode=770
- name: Ensure ansible-container on system
pip: name=ansible-container
tags: docker
- name: Install Amazon MetaData tools
sudo: yes
get_url:
url=http://s3.amazonaws.com/ec2metadata/ec2-metadata
dest=/usr/local/bin/ec2-metadata
mode=0755
- name: Install jq
yum: name=jq
tags: docker
- name: Install Lego Cert Client
get_url:
url=https://github.com/xenolf/lego/releases/download/v0.3.1/lego_linux_amd64.tar.xz
dest=/home/ec2-user/lego_linux_amd64.tar.xz
mode=0755
- name: unarchive lego client
sudo: yes
unarchive:
src=/home/ec2-user/lego_linux_amd64.tar.xz
dest=/opt/
- name: easy_install supervisor
sudo: yes
easy_install: name=supervisor
- name: Make sure supervisor will start with system
service: name=supervisord enabled=yes
- name: install credstash
pip: name=credstash