Mariadb resource
This commit is contained in:
parent
f70a3f36f1
commit
f64b8f88ef
@ -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]
|
@ -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
|
||||
|
@ -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 }}
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user