-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for custom data in vmss #51380
Conversation
The test
The test
The test
|
@@ -206,6 +206,11 @@ | |||
- A list of Availability Zones for your virtual machine scale set | |||
type: list | |||
version_added: "2.8" | |||
custom_data: | |||
description: | |||
- Custom data for using cloud-init for your VM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is a file name? or url? or file content?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's content, in rest api it's base64 encoded content.
so I follow the same rules as in vm (vm has the same option).
I think I will add entire description
@@ -498,6 +507,9 @@ def exec_module(self, **kwargs): | |||
# Set default location | |||
self.location = resource_group.location | |||
|
|||
if self.custom_data: | |||
self.custom_data = to_native(base64.b64encode(to_bytes(self.custom_data))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from code, it's script content, but i think url or filename should be supported for long script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's limited to 16384 bytes.
users can use Ansible lookups to read the content from file or uri.
i don't think we should make it more complicated here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sense
@@ -498,6 +507,9 @@ def exec_module(self, **kwargs): | |||
# Set default location | |||
self.location = resource_group.location | |||
|
|||
if self.custom_data: | |||
self.custom_data = to_native(base64.b64encode(to_bytes(self.custom_data))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sense
@mattclay seems like I have some weird problem here. resource group can't be found..... |
@zikalino We were having issues running Azure tests earlier. I've restarted the failed tests. |
SUMMARY
Just adding support for custom data in VMSS machine scaleset
ISSUE TYPE
COMPONENT NAME
azure_rm_virtualmachine_scaleset
ADDITIONAL INFORMATION