-
Notifications
You must be signed in to change notification settings - Fork 64
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
vmware.vmware_rest.vcenter_vm_guest_customization module Documentation #527
Comments
hi @mgamboa Are you talking about the parameters Ill wait for you to confirm that is what your talking about, but in the meantime here is an example where they are defined as parameters while using the module.
|
What i talking about the example is missing about the use for example of
cloudinit I already defeat to try to figure out how to deploy the machine
with customization on it because the documentation is not acure compare
with other modules that explain the use of it , can we possible to expand
the example a little further to understand better how the syntax works on
the module i try to make something with cloud init but was terrible
impossible even try just to put the hostname can't do i decide just create
the vm the only thing that works for me on vsphere 8 the reason i change to
rest api is because all my code works ok with vsphere 7 but with 8 doesn't
accept tnow the legacy vmware.guest module at all
…On Tue, Sep 10, 2024 at 3:02 AM mikemorency ***@***.***> wrote:
hi @mgamboa <https://github.com/mgamboa>
Are you talking about the parameters vcenter_hostname, vcenter_username,
and vcenter_password? Those parameters are used for authentication to
your vCenter cluster. You need to specify some values, but you can set them
as environment variables (as described here
<https://docs.ansible.com/ansible/latest/collections/vmware/vmware_rest/vcenter_vm_guest_customization_module.html#parameter-vcenter_hostname>)
or as parameters when using the module.
Ill wait for you to confirm that is what your talking about, but in the
meantime here is an example where they are defined as parameters while
using the module.
- name: Customize the VM
vmware.vmware_rest.vcenter_vm_guest_customization:
vcenter_hostname: my-vcenter.domain.local
vcenter_username: ***@***.***
vcenter_password: SuperSecretPass
vm: "{{ lookup('vmware.vmware_rest.vm_moid', '/my_dc/vm/test_vm1') }}"
configuration_spec:
linux_config:
domain: mydomain
hostname:
fixed_name: foobar
type: FIXED
interfaces:
- adapter:
ipv4:
type: STATIC
gateways:
- 192.168.123.1
ip_address: 192.168.123.50
prefix: 24
global_DNS_settings:
dns_suffix_list: []
dns_servers:
- 1.1.1.1
—
Reply to this email directly, view it on GitHub
<#527 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC7SAYZAVNOBBVWZCPNT4TZVXIDTAVCNFSM6AAAAABN4EZCAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZYGYZDONRZGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello, Ive opened a PR to update the documentation examples for this module. Heres the current version, please let me know your thoughts here or in the PR
|
FYI @mgamboa @mikemorency The cited PR takes my provided code in #471 for cloud-init, but does not fix #471 and therefore is documenting a procedure that cannot possibly work for any end-user. It should be removed from the Ansible Collection documentation until the procedure is confirmed working. |
Hi @sean-freeman , I tested with cloud-init and found it to work without much setup. I just needed to install cloud init on the template, which the documentation mentions. I tested with the example provided in this issue. Ill try again with the documentation example and update as necessary. FWIW i accidentally linked 471. I thought it was related but then saw you were talking about the library template module documentation specifically |
Hi @sean-freeman , I checked both cloud init examples in the documentation for this module and they both worked as described. I used a RHEL9 template with cloud-init installed. I did not need any of the other specifications you mentioned in 471. |
Summary
I was trying the module and when running with the example fail the reason was missing the 3 variables that are required, they come documented but in the example is no show how to use it
Issue Type
Documentation Report
Component Name
vmware.vmware_rest.vcenter_vm_guest_customization module
Ansible Version
Collection Versions
$ ansible-galaxy collection list
Configuration
$ ansible-config dump --only-changed
OS / Environment
AWX
Additional Information
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: