# ansible.builtin.setup does not list partition uuid

**URL:** <https://forum.ansible.com/t/ansible-builtin-setup-does-not-list-partition-uuid/33995>\
**Category:** Ansible Project\
**Created:** [October 9, 2020, 1:51pm UTC](https://forum.ansible.com/t/ansible-builtin-setup-does-not-list-partition-uuid/33995 "2020-10-09T13:51:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Claude\_Robitaille](https://avatars.discourse-cdn.com/v4/letter/c/8edcca/32.png) [@Claude\_Robitaille](https://forum.ansible.com/u/Claude_Robitaille)\
**Post date:** [October 9, 2020, 1:51pm UTC](https://forum.ansible.com/t/ansible-builtin-setup-does-not-list-partition-uuid/33995/1 "2020-10-09T13:51:22Z")

</div>

Hello,

I am using ansible to setup a machine, after booting it via a usb drive. In my plays I obviously have to partition the disk as needed. For this, I am using community.general.parted without any trouble.

After partitioning the disk, formatting and mounting the partitions I write to them what is needed. No problem.

Once all is done, I go on to update fstab. For this, I need the partitions UUIDs in order to get a reliable fstab, using device name is not reliable… So I run ansible.builtin.setup to update the facts. Sometime it works, but most of the time the UUID is missing for 1 or more of the partitions.

Sure enough, if I log into the machine, I see that /dev/disk/by-uuid is missing the partition in question. But blkid do list the uuid for that partition so the kernel is well aware of the uuid.

The link in /dev/disk/by-uuid are, according to Google, setup by udevd. I could hunt that side of the equation and try to fix this. I have used partprobe without success. I unmounted and remounted the partition also without success. I suspect that trying to fix what udevd is supposed to do is not going to help me. On the other hand, having a reliable ansible.builtin.setup is probably a good thing to have in general. Is it possible to have it use blkid instead. Or something else?
