diff --git a/resources/mariadb_db/actions/remove.yml b/resources/mariadb_db/actions/remove.yml new file mode 100644 index 00000000..594061a4 --- /dev/null +++ b/resources/mariadb_db/actions/remove.yml @@ -0,0 +1,11 @@ +- hosts: [{{ ip }}] + sudo: yes + tasks: + - name: mariadb db + mysql_db: + name: {{db_name}} + state: absent + login_user: root + login_password: {{login_password}} + login_port: {{login_port}} + login_host: 127.0.0.1 diff --git a/resources/mariadb_db/actions/run.yml b/resources/mariadb_db/actions/run.yml new file mode 100644 index 00000000..4b315b9b --- /dev/null +++ b/resources/mariadb_db/actions/run.yml @@ -0,0 +1,11 @@ +- hosts: [{{ ip }}] + sudo: yes + tasks: + - name: mariadb db + mysql_db: + name: {{ db_name }} + state: present + login_user: root + login_password: {{ login_password }} + login_port: {{ login_port }} + login_host: 127.0.0.1 diff --git a/resources/mariadb_db/meta.yaml b/resources/mariadb_db/meta.yaml new file mode 100644 index 00000000..285aafdb --- /dev/null +++ b/resources/mariadb_db/meta.yaml @@ -0,0 +1,28 @@ +id: mariadb_db +handler: ansible +version: 1.0.0 +actions: + run: run.yml + remove: remove.yml +input: + db_name: + schema: str! + value: + login_user: + schema: str! + value: + login_password: + schema: str! + value: + login_port: + schema: int! + value: + ip: + schema: str! + value: + ssh_key: + schema: str! + value: + ssh_user: + schema: str! + value: