diff --git a/x/resources/keystone/actions/run.yml b/x/resources/keystone/actions/run.yml index e223fe8f..7146e52d 100644 --- a/x/resources/keystone/actions/run.yml +++ b/x/resources/keystone/actions/run.yml @@ -1,6 +1,13 @@ -# TODO - hosts: [{{ ip }}] sudo: yes tasks: - - shell: docker run -d --net="host" --privileged \ - --name {{ name }} {{ image }} + - name: keystone container + docker: + name: {{ name }} + image: {{ image }} + state: running + ports: + - {{ port }}:5000 + - {{ admin_port }}:35357 + volumnes: + - {{ config_dir }}:/etc/keystone diff --git a/x/resources/keystone/meta.yaml b/x/resources/keystone/meta.yaml index 404e2c7e..fbc98de0 100644 --- a/x/resources/keystone/meta.yaml +++ b/x/resources/keystone/meta.yaml @@ -2,6 +2,10 @@ id: keystone handler: ansible version: 1.0.0 input: + image: kollaglue/centos-rdo-keystone + config_dir: + admin_port: + port: ip: - port: 5000 - image: garland/docker-openstack-keystone + ssh_key: + ssh_user: diff --git a/x/resources/mariadb_db/actions/remove.yml b/x/resources/mariadb_db/actions/remove.yml new file mode 100644 index 00000000..fe6d6488 --- /dev/null +++ b/x/resources/mariadb_db/actions/remove.yml @@ -0,0 +1,11 @@ +- hosts: [{{ ip }}] + sudo: yes + tasks: + - name: mariadb db + mysql_db: + name: {{name}} + state: absent + login_user: root + login_password: {{login_password}} + login_port: {{login_port}} + login_host: 127.0.0.1 diff --git a/x/resources/mariadb_db/actions/run.yml b/x/resources/mariadb_db/actions/run.yml new file mode 100644 index 00000000..fda96b5b --- /dev/null +++ b/x/resources/mariadb_db/actions/run.yml @@ -0,0 +1,11 @@ +- hosts: [{{ ip }}] + sudo: yes + tasks: + - name: mariadb db + mysql_db: + name: {{name}} + state: present + login_user: root + login_password: {{login_password}} + login_port: {{login_port}} + login_host: 127.0.0.1 diff --git a/x/resources/mariadb_db/meta.yaml b/x/resources/mariadb_db/meta.yaml new file mode 100644 index 00000000..6bd49b7d --- /dev/null +++ b/x/resources/mariadb_db/meta.yaml @@ -0,0 +1,13 @@ +id: mariadb_table +handler: ansible +version: 1.0.0 +actions: + run: run.yml + remove: remove.yml +input: + login_password: + login_port: + login_user: + ip: + ssh_key: + ssh_user: diff --git a/x/resources/mariadb_table/meta.yaml b/x/resources/mariadb_table/meta.yaml deleted file mode 100644 index 40b92c47..00000000 --- a/x/resources/mariadb_table/meta.yaml +++ /dev/null @@ -1,10 +0,0 @@ -id: mariadb_user -handler: ansible -version: 1.0.0 -actions: - run: run.yml - remove: remove.yml -input: - name: name - password: password - users: [] diff --git a/x/resources/mariadb_user/actions/remove.yml b/x/resources/mariadb_user/actions/remove.yml new file mode 100644 index 00000000..9df0be6c --- /dev/null +++ b/x/resources/mariadb_user/actions/remove.yml @@ -0,0 +1,11 @@ +- hosts: [{{ ip }}] + sudo: yes + tasks: + - name: mariadb user + mysql_user: + name: {{name}} + state: absent + login_user: root + login_password: {{login_password}} + login_port: {{login_port}} + login_host: 127.0.0.1 diff --git a/x/resources/mariadb_user/actions/run.yml b/x/resources/mariadb_user/actions/run.yml new file mode 100644 index 00000000..7f50378a --- /dev/null +++ b/x/resources/mariadb_user/actions/run.yml @@ -0,0 +1,13 @@ +- hosts: [{{ ip }}] + sudo: yes + tasks: + - name: mariadb user + mysql_user: + name: {{name}} + password: {{password}} + priv: {{db}}.*:ALL + state: present + login_user: root + login_password: {{login_password}} + login_port: {{login_port}} + login_host: 127.0.0.1 diff --git a/x/resources/mariadb_user/meta.yaml b/x/resources/mariadb_user/meta.yaml index db859484..2d5a34aa 100644 --- a/x/resources/mariadb_user/meta.yaml +++ b/x/resources/mariadb_user/meta.yaml @@ -5,5 +5,11 @@ actions: run: run.yml remove: remove.yml input: - name: name - password: password + password: + db: + login_password: + login_port: + login_user: + ip: + ssh_key: + ssh_user: