apiVersion: v1
kind: ConfigMap
metadata:
  name: ssm-installer-script
data:
  install.sh: |
    #!/bin/bash
    # Update and install packages
    sudo yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm
    STATUS=$(sudo systemctl status amazon-ssm-agent)
    if echo $STATUS | grep -q "running"; then
        echo "Success"
    else
        echo "Fail" >&2 
    fi