Skip to content

Commit 2d3cf96

Browse files
author
Peter Schiffer
committed
Merge pull request #42 from pschiffe/master
Added example files to the main repo
2 parents e2dd773 + f0ece6f commit 2d3cf96

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

ansible/wordpress/docker.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
- hosts: localhost
3+
vars:
4+
c_state: reloaded
5+
tasks:
6+
- name: mariadb container
7+
docker:
8+
name: my-mariadb
9+
image: mariadb
10+
state: "{{ c_state }}"
11+
pull: always
12+
restart_policy: always
13+
net: bridge
14+
volumes: mariadb-data:/var/lib/mysql
15+
env:
16+
MYSQL_ROOT_PASSWORD: my-secret-pw
17+
- name: wordpress container
18+
docker:
19+
name: my-wordpress
20+
image: wordpress
21+
state: "{{ c_state }}"
22+
pull: always
23+
restart_policy: always
24+
net: bridge
25+
links: my-mariadb:mysql
26+
ports: "80:80"

ansible/wordpress/hosts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
localhost ansible_connection=local
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
my-mariadb:
2+
image: mariadb
3+
restart: always
4+
environment:
5+
MYSQL_ROOT_PASSWORD: my-secret-pw
6+
volumes:
7+
- mariadb-data:/var/lib/mysql
8+
my-wordpress:
9+
image: wordpress
10+
restart: always
11+
ports:
12+
- "80:80"
13+
links:
14+
- my-mariadb:mysql

0 commit comments

Comments
 (0)