#cloud-config runcmd: - addr=$(ip -4 -o addr | grep -v '127.0.0.1' | awk 'NR==1{print $4}' | cut -d '/' -f 1) - echo $addr `hostname` >> /etc/hosts