-
Notifications
You must be signed in to change notification settings - Fork 0
/
dockerstart.yml
56 lines (46 loc) · 1.29 KB
/
dockerstart.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
---
- hosts: webserver
tasks:
- name: install and check Git
become: yes
package:
name: git
state: present
- name: Install and check docker
become: yes
package:
name:
- docker
- docker.io
- docker-compose
- curl
state: latest
- name: Git directory maken
become: yes
file:
path: "/usr/local/etc/dockerstuff"
state: directory
- name: clone needed files from github
become: yes
git:
repo: https://github.com/MatthiasVeelaert/Docker_webserver_files.git
dest: /usr/local/etc/Docker_webservers_files
force: yes
- name: permissions request.sh
file:
dest: /usr/local/etc/Docker_webservers_files/request.sh
mode: a+x
- name: permission dockercomposeup.sh
become: yes
file:
dest: /usr/local/etc/Docker_webservers_files/dockercomposeup.sh
mode: a+x
- name: starting docker-compose
become: yes
command: chdir=/usr/local/etc/Docker_webservers_files/ sh dockercomposeup.sh
- name: check requests
become: yes
command: chdir=/usr/local/etc/Docker_webservers_files/ sh request.sh
register: shell_result
- debug:
var: shell_result.stdout_lines