vagrant-azure
vagrant-azure copied to clipboard
support azure custom-script extension for Linux guests
This will allow custom script to run immediately after Linux VM guest is provisioned. For example, disable requiretty in sudoers file. I am surprised no one has asked for this enhancement feature yet as none of the vagrant rsync and shell provisioning can occur unless requiretty is disabled.
vagrant-aws plugin has a support for this.
config.vm.provider :aws do | aws |
aws.user_data = "#!/bin/bash\nsed -i.orig -e 's/^Defaults.*requiretty/# Defaults requiretty/g' /etc/sudoers"
end
Yep... We need to add this. Thank you for pointing it out.
~~I'm going to add custom_data and a custom script extension this next week.~~ The are slightly different.
Custom Data: https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-classic-inject-custom-data
Custom Script Extension: https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-classic-extensions-customscript
I think most Linux folks with distros that support cloud-init will edge toward custom data as it's faster and a bit more standard.
Is there any hope that this will be done?