diff --git a/resources/data_container/actions/run.yml b/resources/data_container/actions/run.yml index 3a63f6f..9bccb8c 100644 --- a/resources/data_container/actions/run.yml +++ b/resources/data_container/actions/run.yml @@ -6,10 +6,13 @@ image: {{ image }} state: running net: host + {% if ports.value %} ports: {% for port in ports.value %} - {{ port['value'] }}:{{ port['value'] }} {% endfor %} + {% endif %} + {% if host_binds.value %} volumes: # TODO: host_binds might need more work # Currently it's not that trivial to pass custom src: dst here @@ -17,4 +20,5 @@ # so we mount it to the same directory as on host {% for bind in host_binds.value %} - {{ bind['value']['src'] }}:{{ bind['value']['dst'] }}:{{ bind['value'].get('mode', 'ro') }} - {% endfor %} \ No newline at end of file + {% endfor %} + {% endif %} diff --git a/resources/docker_container/actions/run.yml b/resources/docker_container/actions/run.yml index 6dc492a..d052773 100644 --- a/resources/docker_container/actions/run.yml +++ b/resources/docker_container/actions/run.yml @@ -7,12 +7,15 @@ image: {{ image }} state: running net: host + {% if ports.value %} ports: {% for port in ports.value %} {% for p in port['value'] %} - {{ p['value'] }}:{{ p['value'] }} {% endfor %} {% endfor %} + {% endif %} + {% if host_binds.value %} volumes: # TODO: host_binds might need more work # Currently it's not that trivial to pass custom src: dst here @@ -21,3 +24,4 @@ {% for bind in host_binds.value %} - {{ bind['value']['src'] }}:{{ bind['value']['dst'] }}:{{ bind['value'].get('mode', 'ro') }} {% endfor %} + {% endif %} diff --git a/resources/docker_container/meta.yaml b/resources/docker_container/meta.yaml index 8d3c666..9808149 100644 --- a/resources/docker_container/meta.yaml +++ b/resources/docker_container/meta.yaml @@ -9,10 +9,10 @@ input: schema: str! value: ports: - schema: [int] + schema: [{value: [{value: int}]}] value: [] host_binds: - schema: [[int]] + schema: [{value: {src: str, dst: str}}] value: [] volume_binds: schema: [{src: str, dst: str}] diff --git a/resources/haproxy/meta.yaml b/resources/haproxy/meta.yaml index e884a88..7e3125c 100644 --- a/resources/haproxy/meta.yaml +++ b/resources/haproxy/meta.yaml @@ -3,22 +3,22 @@ handler: ansible version: 1.0.0 input: ip: - schema: int! + schema: str! value: config_dir: schema: {src: str!, dst: str!} value: {src: /etc/solar/haproxy, dst: /etc/haproxy} listen_ports: - schema: [int] + schema: [{value: int}] value: [] configs: - schema: [[str]] + schema: [{value: [{value: str}]}] value: [] configs_names: - schema: [str] + schema: [{value: str}] value: [] configs_ports: - schema: [[int]] + schema: [{value: [{value: int}]}] value: [] ssh_user: schema: str! diff --git a/resources/haproxy_keystone_config/meta.yaml b/resources/haproxy_keystone_config/meta.yaml index 0d33630..15bf930 100644 --- a/resources/haproxy_keystone_config/meta.yaml +++ b/resources/haproxy_keystone_config/meta.yaml @@ -9,10 +9,10 @@ input: schema: int! value: 9999 ports: - schema: [int] + schema: [{value: int}] value: servers: - schema: [str] + schema: [{value: str}] value: tags: [resources/haproxy, resource/haproxy_keystone_config] diff --git a/resources/mariadb_db/actions/run.yml b/resources/mariadb_db/actions/run.yml index 0efb73e..4b315b9 100644 --- a/resources/mariadb_db/actions/run.yml +++ b/resources/mariadb_db/actions/run.yml @@ -3,9 +3,9 @@ tasks: - name: mariadb db mysql_db: - name: {{db_name}} + name: {{ db_name }} state: present login_user: root - login_password: {{login_password}} - login_port: {{login_port}} + login_password: {{ login_password }} + login_port: {{ login_port }} login_host: 127.0.0.1 diff --git a/resources/mariadb_service/meta.yaml b/resources/mariadb_service/meta.yaml index 0df9dd0..826a062 100644 --- a/resources/mariadb_service/meta.yaml +++ b/resources/mariadb_service/meta.yaml @@ -9,10 +9,10 @@ input: schema: str! value: password port: - schema: str! + schema: int! value: 3306 ip: - schema: int! + schema: str! value: ssh_key: schema: str! diff --git a/resources/mariadb_user/actions/run.yml b/resources/mariadb_user/actions/run.yml index b098180..d600c13 100644 --- a/resources/mariadb_user/actions/run.yml +++ b/resources/mariadb_user/actions/run.yml @@ -3,12 +3,12 @@ tasks: - name: mariadb user mysql_user: - name: {{new_user_name}} - password: {{new_user_password}} - priv: {{db_name}}.*:ALL + name: {{ new_user_name }} + password: {{ new_user_password }} + priv: {{ db_name }}.*:ALL host: '%' state: present login_user: root - login_password: {{login_password}} - login_port: {{login_port}} + login_password: {{ login_password }} + login_port: {{ login_port }} login_host: 127.0.0.1