This isn't necessarily an Ansible problem, but more likely to just be consistent device enumeration.
Some starter reading that might help : - https://kb.vmware.com/s/article/2048497 - https://kb.vmware.com/s/article/2091560 - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/storage_administration_guide/persistent_naming - https://wiki.debian.org/Persistent_disk_names - https://wiki.debian.org/udev On Wed, 23 Aug 2023 at 11:41, Deepak B K <[email protected]> wrote: > Hi Team, > > I have a strange issue while add disk to my vm image and I using the > community vmware_guest_disk . when vm is created with a default template > sometime the drive letter parameter is drifted. > example /dev/sdb is created instead /dev/sda. > > Please find my code below. > > name: "Add disk for VM: {{ vm_name }}" > community.vmware.vmware_guest_disk: > hostname: "{{ vmware.hostname }}" > username: "{{ vmware.username }}" > password: "{{ vmware.password }}" > validate_certs: "{{ vmware.validate_certs }}" > datacenter: "{{ vmware_env.datacenter }}" > moid: '{{ vm_info.id }}' > disk: > - size_kb: "{{ (vm_disk.disk_capacity / 1024)|int }}" > type: "{{ vmware.storage_provisioning | default('thick') }}" > datastore: "{{ vmware_env.datastore }}" > state: present > controller_type: "{{ vm_disk.disk_type | lower }}" > controller_number: 0 > unit_number: 1 > delegate_to: "{{ delegation_host }}" > > I appreciate your suggestion on this issue. > > > Thanks > Deepak Kumar > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/d778487a-3c0a-4b7d-99a4-5bfc65ec7f9en%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/d778487a-3c0a-4b7d-99a4-5bfc65ec7f9en%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAKtKohSGok7fmB4xowo5guNE%2BwF2yti3khqLANEomUFFe8nLWA%40mail.gmail.com.
