{ "metadata": { "template_author": "Selffish", "author-email": "test@bell.ca", "template_name": "RT-ansible-python-dg", "template_version": "1.0.0", "template_tags": "Bell, CBA, test" }, "dsl_definitions": { "ansible-remote-endpoint": { "type": "token-auth", "url": .MOCK_SRV, "token": "Bearer J9gEtMDqf7P4YsJ7444fioY9VAhLDIs1" }, "remote-executor": { "type": "token-auth", "host": .CMD_EXEC_SVC, "port": "50051", "token": "Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==" } }, "topology_template": { "workflows": { "run-dg": { "steps": { "process": { "description": "Run ansible then pass artifacts to command executor", "target": "execute-dg", "activities": [ { "call_operation": "" } ] } }, "inputs": { "endpoint-selector": { "required": true, "type": "string" }, "job-template-name": { "required": true, "type": "string" }, "limit": { "required": false, "type": "string" }, "inventory": { "required": false, "type": "string" }, "tags": { "required": false, "type": "string" }, "skip-tags": { "required": false, "type": "string" }, "extra-vars": { "required": false, "type": "json" } }, "outputs": { "execute-command-logs": { "type": "string", "value": { "get_attribute": [ "python", "execute-command-logs" ] } } } } }, "node_templates": { "execute-dg": { "type": "dg-generic", "properties": { "content": { "get_artifact": [ "SELF", "dg" ] }, "dependency-node-templates": [ "ansible", "python" ] }, "artifacts": { "dg": { "type": "artifact-directed-graph", "file": "Plans/ansible-python-dg.xml" } } }, "ansible": { "type": "component-remote-ansible-executor", "interfaces": { "ComponentRemoteAnsibleExecutor": { "operations": { "process": { "inputs": { "endpoint-selector": "*ansible-remote-endpoint", "job-template-name": { "get_input": "job-template-name" }, "limit": { "get_input": "limit" }, "inventory": { "get_input": "inventory" }, "extra-vars": { "get_input": "extra-vars" }, "tags": { "get_input": "tags" }, "skip-tags": { "get_input": "skip-tags" } } } } } } }, "python": { "type": "component-remote-python-executor", "interfaces": { "ComponentRemotePythonExecutor": { "operations": { "process": { "implementation": { "primary": "component-script", "timeout": 1800, "operation_host": "SELF" }, "inputs": { "endpoint-selector": "remote-executor", "command": "python rt-python.py", "dynamic-properties": { "get_attribute": [ "ansible", "ansible-artifacts" ] }, "packages": [ { "type": "pip", "package": [ "requests" ] } ] } } } } }, "artifacts": { "component-script": { "type": "artifact-script-python", "file": "Scripts/rt-python.py" } } } } } }