Record date/time of VM creation

This commit is contained in:
Jan Stodola 2019-02-05 17:08:10 +01:00 committed by Alexander Todorov
parent 069c1faa4f
commit e918ff807c
1 changed files with 4 additions and 0 deletions

View File

@ -97,6 +97,8 @@ rlJournalStart
rlRun -t -c "ssh-keygen -t rsa -N '' -f $SSH_KEY_DIR/id_rsa"
SSH_PUB_KEY=`cat $SSH_KEY_DIR/id_rsa.pub`
now=$(date -u '+%FT%T')
TMP_DIR=`mktemp -d /tmp/composer-azure.XXXXX`
cat > $TMP_DIR/azure-playbook.yaml << __EOF__
---
@ -117,6 +119,8 @@ rlJournalStart
image:
name: $OS_IMAGE_NAME
resource_group: $AZURE_RESOURCE_GROUP
tags:
"first_seen": "$now"
__EOF__
rlRun -t -c "ansible-playbook $TMP_DIR/azure-playbook.yaml"