-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrocker.yml
39 lines (33 loc) · 890 Bytes
/
rocker.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
---
- name: Run Custom Docker Image
hosts: localhost
gather_facts: false
tasks:
- name: Install Docker
apt:
name: docker.io
state: present
become: true
- name: Clone GitHub repository
git:
repo: https://github.com/vusaverse/docker-rocker.git
dest: /tmp/custom-rocker
register: git_result
- name: Change permission of bash script
file:
path: /tmp/custom-rocker/test_run.sh
mode: u+x
- name: Execute bash script
shell: /tmp/custom-rocker/test_run.sh
args:
executable: /bin/bash
register: script_result
become: true
- name: Print script execution result
debug:
var: script_result.stdout
- name: Open browser on localhost:8787
uri:
url: http://localhost:8787
delegate_to: localhost
ignore_errors: true