Mariadb resource

This commit is contained in:
Łukasz Oleś 2015-04-21 11:49:49 +00:00
parent f70a3f36f1
commit f64b8f88ef
4 changed files with 20 additions and 18 deletions

View File

@ -1,10 +0,0 @@
id: docker
type: resource
handler: ansible
version: v1
actions:
run: simple/docker/run.yml
remove: simple/docker/remove.yml
input:
base_image: ubuntu
tags: [n/1]

View File

@ -1,6 +1,8 @@
- hosts: [{{ ip }}]
sudo: yes
tasks:
- shell: docker stop {{ name }}
- shell: docker rm {{ name }}
- name: mariadb container
docker:
name: {{ name }}
image: {{ image }}
state: absent

View File

@ -1,6 +1,12 @@
- hosts: [{{ ip }}]
sudo: yes
tasks:
- shell: docker run -d --net="host" --privileged \
--name {{ name }} {{ image }}
- name: mariadb container
docker:
name: {{ name }}
image: {{ image }}
state: running
ports:
- {{ port }}:3306
env:
MYSQL_ROOT_PASSWORD: {{ root_password }}

View File

@ -2,5 +2,9 @@ id: mariadb
handler: ansible
version: 1.0.0
input:
image: tutum/mariadq
tags: [n/1]
image:
root_password:
port:
ip:
ssh_key:
ssh_user: