From 1a3bc7d7468d3f6a4320fa0b8061b25cb93c5cd2 Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Thu, 20 Sep 2018 14:22:53 -0400 Subject: [PATCH] Update azure_rm_virtualmachine.py (#45325) * Update azure_rm_virtualmachine.py A lot of Azure images are not cloud-init ready and need to be prepared manually before attempting to use the custom_data option of this module. Adding a line to the description to make others aware. If, like me, they are used to working with AWS AMIs that all seem to have cloud-init baked in, this could prevent some troubleshooting as to why their custom_data scripts aren't running in Azure. * fixing addition to azure_rm_virtualmachine.py * Update azure_rm_virtualmachine.py * final update * fixed url syntax * nuked trailing whitespace --- lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py index ccb2efc2ac2..0cc47878607 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py @@ -29,6 +29,10 @@ description: - Before Ansible 2.5, this required an image found in the Azure Marketplace which can be discovered with M(azure_rm_virtualmachineimage_facts). In Ansible 2.5 and newer, custom images can be used as well, see the examples for more details. + - If you need to use the I(custom_data) option, many images in the marketplace are not cloud-init ready. Thus, data + sent to I(custom_data) would be ignored. If the image you are attempting to use is not listed in + U(https://docs.microsoft.com/en-us/azure/virtual-machines/linux/using-cloud-init#cloud-init-overview), + follow these steps U(https://docs.microsoft.com/en-us/azure/virtual-machines/linux/cloudinit-prepare-custom-image). options: resource_group: