Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. Content-Type: multipart/mixed; boundary="//"
  2. MIME-Version: 1.0
  3.  
  4. --//
  5. Content-Type: text/cloud-config; charset="us-ascii"
  6. MIME-Version: 1.0
  7. Content-Transfer-Encoding: 7bit
  8. Content-Disposition: attachment; filename="cloud-config.txt"
  9.  
  10. #cloud-config
  11. cloud_final_modules:
  12. - [scripts-user, always]
  13.  
  14. --//
  15. Content-Type: text/x-shellscript; charset="us-ascii"
  16. MIME-Version: 1.0
  17. Content-Transfer-Encoding: 7bit
  18. Content-Disposition: attachment; filename="userdata.txt"
  19.  
  20. #!/bin/bash
  21. echo "Start user_data" > /tmp/bootstrap.log
  22. yum -y update >> /tmp/bootstrap.log
  23. echo "Trying to read the Artifactory secret value" >> /tmp/bootstrap.log
  24. ARTIFACTORY_USER="swf-aptitude-nl" >> /tmp/bootstrap.log
  25. export AWS_DEFAULT_REGION="eu-west-1"
  26. ARTIFACTORY_PASSWORD=$(aws secretsmanager get-secret-value --secret-id ArtifactoryCredentials | jq --raw-output '.SecretString')
  27. curl -s -u $ARTIFACTORY_USER:$ARTIFACTORY_PASSWORD https://swfactory.aegon.com/artifactory/aptitude/jdk-8u231-linux/jdk-8u231-linux-x64.rpm
  28. ls -ltr jdk-8u231-linux-x64.rpm >> /tmp/bootstrap.log
  29. java -version >> /tmp/bootstrap.log
  30. --//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement