First off, thanks Christian for the collection and the nice SUSECON talk.
I picked up my Uyuni experiments and integrated your collection into my little vagrant setup. I used a playbook like the following:
[...]
roles:
- role: 'stdevel.uyuni.storage'
uyuni_pv: '/dev/vdb'
- role: 'stdevel.uyuni.server'
[...]
My guess was that the storage should be prepared first, before installing the server and using the mounts.
But this fails, as xfsprogs is not yet installed when the storage role runs:
TASK [stdevel.uyuni.storage : Create file systems] *****************************
failed: [uyuniserver01] (item={'name': 'lv_uyuni', 'type': 'xfs', 'mountpoint': '/var/spacewalk', 'size': 10240}) => {"ansible_loop_var": "item", "changed": false, "item": {"mountpoint": "/var/spacewalk", "name": "lv_uyuni", "size": 10240, "type": "xfs"}, "msg": "Failed to find required executable \"mkfs.xfs\" in paths: /usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin:/usr/local/sbin"}
failed: [uyuniserver01] (item={'name': 'lv_pgsql', 'type': 'xfs', 'mountpoint': '/var/lib/pgsql', 'size': 10240}) => {"ansible_loop_var": "item", "changed": false, "item": {"mountpoint": "/var/lib/pgsql", "name": "lv_pgsql", "size": 10240, "type": "xfs"}, "msg": "Failed to find required executable \"mkfs.xfs\" in paths: /usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin:/usr/local/sbin"}
failed: [uyuniserver01] (item={'name': 'lv_cache', 'type': 'xfs', 'mountpoint': '/var/cache/rhn', 'size': 10240}) => {"ansible_loop_var": "item", "changed": false, "item": {"mountpoint": "/var/cache/rhn", "name": "lv_cache", "size": 10240, "type": "xfs"}, "msg": "Failed to find required executable \"mkfs.xfs\" in paths: /usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin:/usr/local/sbin"}
Manually installing the xfsprogs package before running the storage role fixes the issue.
I think it would be best to move the xfsprogs installation into the storage role. If desired, I can create a PR for that.