mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 17:03:06 -06:00
DCD-880: Create SSM document to run slingshot
This commit is contained in:
30
ssm-documents/ATL-RunAutomationPlaybook.json
Normal file
30
ssm-documents/ATL-RunAutomationPlaybook.json
Normal file
@@ -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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user