From 054e5eff59e4266c373752f46f93521ef26134ee Mon Sep 17 00:00:00 2001 From: Ben Partridge Date: Fri, 3 Jan 2020 16:12:18 +1100 Subject: [PATCH] DCD-880: Create SSM document to run slingshot --- ssm-documents/ATL-RunAutomationPlaybook.json | 30 ++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 ssm-documents/ATL-RunAutomationPlaybook.json diff --git a/ssm-documents/ATL-RunAutomationPlaybook.json b/ssm-documents/ATL-RunAutomationPlaybook.json new file mode 100644 index 0000000..11ea298 --- /dev/null +++ b/ssm-documents/ATL-RunAutomationPlaybook.json @@ -0,0 +1,30 @@ +{ + "schemaVersion": "2.2", + "description": "Use this document to run Ansible Playbooks from the atlassian deployment automation repo", + "parameters": { + "Playbook": { + "type": "String", + "description": "The Playbook file to run, relative to the repository root." + }, + "InvocationVariables": { + "type": "String", + "description": "Variables to apply to the playbook. See playbook documentation for details on required parameters.", + "displayType": "textarea", + "allowedPattern": "^$|^\\w+\\=[^\\s|:();&]+(\\s\\w+\\=[^\\s|:();&]+)*$" + } + }, + "mainSteps": [ + { + "action": "aws:runShellScript", + "name": "runShellScript", + "inputs": { + "runCommand": [ + "#!/bin/bash", + "cd /opt/atlassian/dc-deployments-automation", + "export PLAYBOOK_INVOCATION_EXTRA_PARAMS='{{InvocationVariables}}'", + "./bin/ansible-with-atl-env ./inv/aws_node_local aws_slingshot_backup.yml /var/log/ansible-slingshot.log" + ] + } + } + ] +} \ No newline at end of file