diff options
Diffstat (limited to 'components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json')
-rw-r--r-- | components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json | 108 |
1 files changed, 95 insertions, 13 deletions
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json index 4c3ece381..656176c11 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json +++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json @@ -26,15 +26,23 @@ } ], "dsl_definitions": { - "execute-argument-properties": { - "input": "data" - }, "remote-argument-properties": { - "arg-0": "-a", - "arg-1": "sample-data 1", - "arg-4": "sample-data 4", - "arg-3": "sample-data 3", - "arg-2": "-b" + "input": { + "get_input": "input" + } + }, + "ansible-argument-properties": { + "arg0": "-i", + "arg1": "Scripts/ansible/inventory.yaml", + "arg2": "--extra-vars", + "arg3": { + "get_attribute": [ + "resolve-ansible-vars", + "", + "assignment-params", + "ansible-vars" + ] + } } }, "topology_template": { @@ -82,7 +90,7 @@ "steps": { "execute-script": { "description": "Execute Remote Ansible Script", - "target": "execute-remote-ansible", + "target": "execute-remote-ansible-process", "activities": [ { "call_operation": "" @@ -90,8 +98,35 @@ ] } }, - "inputs": {}, + "inputs": { + "ip": { + "required": false, + "type": "string" + }, + "username": { + "required": false, + "type": "string" + }, + "password": { + "required": false, + "type": "string" + }, + "execute-remote-ansible-properties": { + "description": "Dynamic PropertyDefinition for workflow(execute-remote-ansible).", + "required": true, + "type": "dt-execute-remote-ansible-properties" + } + }, "outputs": { + "ansible-variable-resolution": { + "type": "json", + "value": { + "get_attribute": [ + "resolve-ansible-vars", + "assignment-params" + ] + } + }, "prepare-environment-logs": { "type": "string", "value": { @@ -133,8 +168,7 @@ ] } ], - "argument-properties": "*remote-argument-properties", - "dynamic-properties": "*execute-argument-properties" + "argument-properties": "*remote-argument-properties" } } } @@ -147,6 +181,53 @@ } } }, + "execute-remote-ansible-process": { + "type": "dg-generic", + "properties": { + "content": { + "get_artifact": [ + "SELF", + "dg-execute-remote-ansible-process" + ] + }, + "dependency-node-templates": [ + "resolve-ansible-vars", + "execute-remote-ansible" + ] + }, + "artifacts": { + "dg-execute-remote-ansible-process": { + "type": "artifact-directed-graph", + "file": "Plans/CONFIG_ExecAnsiblePlaybook.xml" + } + } + }, + "resolve-ansible-vars": { + "type": "component-resource-resolution", + "interfaces": { + "ResourceResolutionComponent": { + "operations": { + "process": { + "inputs": { + "artifact-prefix-names": [ + "ansible-vars" + ] + } + } + } + } + }, + "artifacts": { + "ansible-vars-template": { + "type": "artifact-template-velocity", + "file": "Templates/ansible-vars-template.vtl" + }, + "ansible-vars-mapping": { + "type": "artifact-mapping-resource", + "file": "Templates/ansible-vars-mapping.json" + } + } + }, "execute-remote-ansible": { "type": "component-remote-python-executor", "interfaces": { @@ -157,7 +238,8 @@ "primary": "component-script" }, "inputs": { - "command": "ansible-playbook first.yaml", + "command": "ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook first.yaml", + "argument-properties": "*ansible-argument-properties", "packages": [ { "type": "pip", |