vagrant-azure icon indicating copy to clipboard operation
vagrant-azure copied to clipboard

support azure custom-script extension for Linux guests

Open ayen-tibco opened this issue 8 years ago • 3 comments

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

ayen-tibco avatar Dec 07 '16 20:12 ayen-tibco

Yep... We need to add this. Thank you for pointing it out.

devigned avatar Feb 02 '17 01:02 devigned

~~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.

devigned avatar Feb 26 '17 15:02 devigned

Is there any hope that this will be done?

kevindtimm avatar Aug 18 '20 22:08 kevindtimm