-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook.yml
158 lines (138 loc) · 4.26 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
- hosts: localhost
name: configuration
user: fedora
become: yes
become_user: root
gather_facts: true
tasks:
- name: Install python setup tools
dnf: name=python-setuptools
tags: docker
- name: Install git
dnf: 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
dnf: name=docker state=latest
tags: 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.10.0/docker-compose-Linux-x86_64
dest=/usr/local/bin/docker-compose
mode=0755
- name: Install list of packages
dnf: name={{item}} state=installed
with_items:
- which
- findutils
- procps-ng
- git
- gnupg2
- docker-engine
- patch
- redhat-rpm-config
- libyaml-devel
- glibc-headers
- autoconf
- gcc-c++
- glibc-devel
- readline-devel
- zlib-devel
- libffi-devel
- openssl-devel
- make
- bzip2
- automake
- libtool
- bison
- sqlite-devel
- ruby
- ruby-devel
- libxml2-devel
- name: setup directory for limecompiler
sudo: yes
file:
owner=fedora
group=fedora
path=/opt/limecompiler
state=directory
mode=770
- name: checkout latest from git of Limecompiler
git:
repo=https://github.com/ThreatResponse/lime-compiler.git
dest=/opt/limecompiler
update=yes
- name: setup directory build
sudo: yes
file:
owner=fedora
group=fedora
path=/opt/limecompiler/build
state=directory
mode=770
- name: setup directory for modules
sudo: yes
file:
owner=fedora
group=fedora
path=/opt/limecompiler/build/modules
state=directory
mode=770
- name: setup directory for archive
sudo: yes
file:
owner=fedora
group=fedora
path=/opt/limecompiler/archive
state=directory
mode=770
- name: change /opt/limecompiler permissions
sudo: yes
file:
owner=fedora
group=fedora
path=/opt/limecompiler
state=directory
recurse=yes
- name: ensure exec permissions
sudo: yes
file:
owner=fedora
group=fedora
path=/home/fedora/01-sync.sh
mode=770
- name: ensure exec permissions
sudo: yes
file:
owner=fedora
group=fedora
path=/home/fedora/02-build.sh
mode=774
- name: ensure exec permissions
sudo: yes
file:
owner=fedora
group=fedora
path=/home/fedora/03-sync.sh
mode=770
- name: create docker group
sudo: yes
group:
name=docker
- name: add fedora user to docker group
sudo: yes
user:
name=fedora
groups=docker
append=yes
# - name: Set SELinux to Permissive for build
# selinux: policy=targeted state=permissive