summaryrefslogtreecommitdiffstats
path: root/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json
diff options
context:
space:
mode:
authorAlexis de Talhouët <adetalhouet89@gmail.com>2019-04-25 09:33:43 -0400
committerAlexis de Talhouët <adetalhouet89@gmail.com>2019-04-25 10:56:56 -0400
commitdea21123218a3ac602f9a859ffddae8e72e4194d (patch)
treef24daa60dd85b29a6867969f5d0ce98b3cc801fd /components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Definitions/remote_scripts.json
parent79895ed99627931ab6c934dab074e36c3e9e06a4 (diff)
Finalize ansible usage
Change-Id: Iaca6bb573e31607eaa9a3a603e1e4beae60c817c Issue-ID: CCSDK-1215 Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
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.json108
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",