我似乎无法使用此字符串访问深度嵌入的 ansible_fact:
hostvars[inventory_hostname]['ansible_devices']['sda']['partitions']['sda2']['holders'] }}
这是我试图引用的事实树的一部分。
"ansible_devices": {
"sda": {
"holders": [],
"host": "RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS-3 3108 [Invader] (rev 02)",
"partitions": {
"sda1": {
"holders": [],
"sectors": "614400",
"sectorsize": 512,
"size": "300.00 MB",
"start": "2048",
},
"sda2": {
"holders": [
"root-root",
"root-swap",
"root-home",
"root-opt",
"root-tmpl",
"root-usr",
"root-var"
],
我将如何检查分区“root-home”?谢谢!