dyindude / ubuntu-zfs

BSD 2-Clause "Simplified" License
8 stars 4 forks source link

convert shell echo for fstab to lineinfile module #15

Open dyindude opened 6 years ago

dyindude commented 6 years ago

believe we're doing this for all contents of fstab right now, should be either able to template the file or use with_items with lineinfile

dyindude commented 6 years ago

related to #14

dyindude commented 6 years ago

this may be tricky, because we're relying on a subshell from blkid for some of the output. may just defer this to later

dyindude commented 6 years ago

this has me wondering if the value for PARTUUID is available in ansible facts. the partition isn't created until after starting of provisioning, but maybe refreshing metadata would do the trick

dyindude commented 6 years ago

facts get updated after the first role (livecd) before loading the second role (chroot) hostvars[inventory_hostname]['ansible_devices'][{{ device }}]['partitions'][{{ partition }}]['uuid']

dyindude commented 6 years ago

blah, this was quickly turning into spaghetti code..will have to take another crack at it sometime