Without seeing any sample code it's impossible to be sure.

However, this is *probably *something to do with persistent disk
enumeration/Udev behaviour.

For GCP see:
https://cloud.google.com/compute/docs/disks/set-persistent-device-name-in-linux-vm
But this isn't specific to Google Cloud, other public clouds and
virtualisation platforms demonstrate the same behavior.

If 'pass a list of disks to "disks" property' includes paths like /dev/sda,
/dev/sdb, for example, then it's entirely possible that /dev/sda and
/dev/sdb would switch round after a VM restart. Udev endeavours to provide
rules to prevent this but it isn't 100% reliable.



On Mon, 23 Oct 2023 at 14:46, Libo Yu <[email protected]> wrote:

> We are using ansible 2.9 on red hat 9. We try to create a GCP instance
> with more than one persistent disks. We pass a list of disks to "disks"
> property. The first one is the boot drive and its bool flag is set to true.
> But we observe that in many cases, the second one drive or other drive is
> used as boot drive. When the same ansible script is used on red hat 7, it
> never has this issue. Anybody has any idea about this issue?
>
> --
> 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/85f425fd-cc2d-4717-ac29-c864debdf31an%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/85f425fd-cc2d-4717-ac29-c864debdf31an%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/CAKtKohQCd%2BAtDs43mf2wKX9j_SVv2722sgy1v5RUDS2UpBP80g%40mail.gmail.com.

Reply via email to