tpotce/cloud/terraform/cloud-init.yaml
Sebastian Haderecker 7763ceff4c Test connection before git clone
Test the connection to github before cloning the repository.
Previously it could happen that the git clone failed due to the external network connection not being established immediately after boot.
2021-05-19 15:57:30 +02:00

26 lines
595 B
YAML

#cloud-config
timezone: ${timezone}
packages:
- git
runcmd:
- curl -sS --retry 5 https://github.com
- git clone https://github.com/telekom-security/tpotce /root/tpot
- /root/tpot/iso/installer/install.sh --type=auto --conf=/root/tpot.conf
- rm /root/tpot.conf
- /sbin/shutdown -r now
password: ${password}
chpasswd:
expire: false
write_files:
- content: |
# tpot configuration file
myCONF_TPOT_FLAVOR='${tpot_flavor}'
myCONF_WEB_USER='${web_user}'
myCONF_WEB_PW='${web_password}'
owner: root:root
path: /root/tpot.conf
permissions: '0600'