We have a react app deployed in AWS which allows us to store specific device information, and we also have created an ec2 instance which takes that data and allows us to configure the device it was based on. We are trying to create a way to run the playbook within the EC2 using a button on the web app, however currently drawing a blank on how to do so.
We used to use a application named Morpheus but ran into all sorts of issues. We are now trying to keep everything from within AWS.
Any suggestions are helpful.
So I have tried to make use of the SSM Document and it has begun to confuse me. I attempted to make use of the script to try navigate to my folder and then run the playbook. However my method is not working at all.
{
"schemaVersion": "2.2",
"description": "Command Document Example JSON Template",
"parameters": {
"Message": {
"type": "String",
"description": "Example",
"default": "Hello World"
}
},
"mainSteps": [
{
"action": "aws:runPowerShellScript",
"name": "navigate to file",
"inputs": {
"runCommand": [ "cd /echo_configure/Config" ]
}
},
{
"action": "aws:runPowerShellScript",
"name": "execute file",
"inputs": {
"runCommand": [ "ansible-playbook apply.yml" ]
}
}
]
}
Could I get some help to push me in the right direction