Open dberg1 opened 4 years ago
Report VIOS mappings as Ansible facts using lsmap command. Sample output:
lsmap
"ansible_facts.mappings": { "npiv": { "vfchost0": { "clntid": 2, "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 4, "physloc": "U8284.22A.21FD4BV-V1-C3", "ports": 0, "status": "NOT_LOGGED_IN" }, "vfchost1": { "clntid": 3, "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 4, "physloc": "U8284.22A.21FD4BV-V1-C4", "ports": 0, "status": "NOT_LOGGED_IN" }, "vfchost10": { "clntid": 14, "clntname": "castor10", "clntos": "AIX", "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 10, "physloc": "U8284.22A.21FD4BV-V1-C16", "ports": 3, "status": "LOGGED_IN", "vfcclient": "fcs0", "vfcclientdrc": "U8284.22A.21FD4BV-V14-C3" }, "vfchost11": { "clntid": 15, "clntname": "castor11", "clntos": "AIX", "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 10, "physloc": "U8284.22A.21FD4BV-V1-C17", "ports": 3, "status": "LOGGED_IN", "vfcclient": "fcs0", "vfcclientdrc": "U8284.22A.21FD4BV-V15-C3" }, "vfchost12": { "clntid": 18, "clntname": "castor13", "clntos": "AIX", "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 10, "physloc": "U8284.22A.21FD4BV-V1-C18", "ports": 3, "status": "LOGGED_IN", "vfcclient": "fcs0", "vfcclientdrc": "U8284.22A.21FD4BV-V18-C3" }, "vfchost13": { "clntid": 20, "clntname": "castordbe", "clntos": "Linux", "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 10, "physloc": "U8284.22A.21FD4BV-V1-C21", "ports": 3, "status": "LOGGED_IN", "vfcclient": "host1", "vfcclientdrc": "U8284.22A.21FD4BV-V20-C3" }, "vfchost14": { "clntid": 27, "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 4, "physloc": "U8284.22A.21FD4BV-V1-C28", "ports": 0, "status": "NOT_LOGGED_IN" }, "vfchost15": { "clntid": 26, "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 4, "physloc": "U8284.22A.21FD4BV-V1-C34", "ports": 0, "status": "NOT_LOGGED_IN" }, "vfchost16": { "clntid": 22, "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 4, "physloc": "U8284.22A.21FD4BV-V1-C22", "ports": 0, "status": "NOT_LOGGED_IN" }, "vfchost17": { "clntid": 23, "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 4, "physloc": "U8284.22A.21FD4BV-V1-C24", "ports": 0, "status": "NOT_LOGGED_IN" }, "vfchost18": { "clntid": 19, "clntname": "castor14", "clntos": "AIX", "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 10, "physloc": "U8284.22A.21FD4BV-V1-C26", "ports": 3, "status": "LOGGED_IN", "vfcclient": "fcs0", "vfcclientdrc": "U8284.22A.21FD4BV-V19-C3" }, "vfchost19": { "clntid": 25, "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 4, "physloc": "U8284.22A.21FD4BV-V1-C33", "ports": 0, "status": "NOT_LOGGED_IN" }, "vfchost2": { "clntid": 4, "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 4, "physloc": "U8284.22A.21FD4BV-V1-C5", "ports": 0, "status": "NOT_LOGGED_IN" }, "vfchost3": { "clntid": 5, "clntname": "castor4", "clntos": "AIX", "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 10, "physloc": "U8284.22A.21FD4BV-V1-C6", "ports": 3, "status": "LOGGED_IN", "vfcclient": "fcs0", "vfcclientdrc": "U8284.22A.21FD4BV-V5-C3" }, "vfchost4": { "clntid": 11, "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 4, "physloc": "U8284.22A.21FD4BV-V1-C14", "ports": 0, "status": "NOT_LOGGED_IN" }, "vfchost5": { "clntid": 27, "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 4, "physloc": "U8284.22A.21FD4BV-V1-C50", "ports": 0, "status": "NOT_LOGGED_IN" }, "vfchost6": { "clntid": 8, "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 4, "physloc": "U8284.22A.21FD4BV-V1-C25", "ports": 0, "status": "NOT_LOGGED_IN" }, "vfchost7": { "clntid": 10, "clntname": "castor8", "clntos": "AIX", "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 10, "physloc": "U8284.22A.21FD4BV-V1-C12", "ports": 3, "status": "LOGGED_IN", "vfcclient": "fcs0", "vfcclientdrc": "U8284.22A.21FD4BV-V10-C3" }, "vfchost8": { "clntid": 13, "clntname": "castor12", "clntos": "AIX", "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 10, "physloc": "U8284.22A.21FD4BV-V1-C8", "ports": 3, "status": "LOGGED_IN", "vfcclient": "fcs0", "vfcclientdrc": "U8284.22A.21FD4BV-V13-C3" }, "vfchost9": { "clntid": 12, "fc": "fcs1", "fcphysloc": "U78CD.001.FZH1998-P1-C6-T2", "flags": 4, "physloc": "U8284.22A.21FD4BV-V1-C15", "ports": 0, "status": "NOT_LOGGED_IN" } }, "svea": { "ent4": { "backing": "ent3", "bdphysloc": "U78CB.001.WZS09RT-P1-C2-T4", "physloc": "U8284.22A.21FD4BV-V1-C2-T1", "sea": "ent5", "status": "Available" }, "ent6": { "backing": "ent3", "bdphysloc": "U78CB.001.WZS09RT-P1-C2-T4", "physloc": "U8284.22A.21FD4BV-V1-C10-T1", "sea": "ent5", "status": "Available" } }, "vscsi": { "vhost0": { "clientid": "0x00000003", "physloc": "U8284.22A.21FD4BV-V1-C7", "vtds": {} }, "vhost1": { "clientid": "0x00000013", "physloc": "U8284.22A.21FD4BV-V1-C19", "vtds": { "vtopt0": { "backing": "/var/vio/VMLibrary/RHEL73-DVD", "lun": "0x8200000000000000", "status": "Available" } } }, "vhost10": { "clientid": "0x0000001a", "physloc": "U8284.22A.21FD4BV-V1-C31", "vtds": {} }, "vhost11": { "clientid": "0x0000001b", "physloc": "U8284.22A.21FD4BV-V1-C51", "vtds": {} }, "vhost12": { "clientid": "0x00000019", "physloc": "U8284.22A.21FD4BV-V1-C32", "vtds": {} }, "vhost13": { "clientid": "0x00000015", "physloc": "U8284.22A.21FD4BV-V1-C35", "vtds": {} }, "vhost2": { "clientid": "0x00000007", "physloc": "U8284.22A.21FD4BV-V1-C9", "vtds": { "vtscsi1": { "backing": "npiv2vio-rootvg", "lun": "0x8100000000000000", "status": "Available" } } }, "vhost3": { "clientid": "0x0000000b", "physloc": "U8284.22A.21FD4BV-V1-C13", "vtds": {} }, "vhost4": { "clientid": "0x00000014", "physloc": "U8284.22A.21FD4BV-V1-C20", "vtds": { "vtopt1": { "lun": "0x8100000000000000", "status": "Available" } } }, "vhost5": { "clientid": "0x00000016", "physloc": "U8284.22A.21FD4BV-V1-C23", "vtds": { "vtopt2": { "backing": "/var/vio/VMLibrary/ubuntu-16.04.3-server-ppc64el", "lun": "0x8100000000000000", "status": "Available" } } }, "vhost6": { "clientid": "0x00000017", "physloc": "U8284.22A.21FD4BV-V1-C11", "vtds": { "vopt3": { "backing": "/var/vio/VMLibrary/ubuntu-16.04.3-ppc64el.iso", "lun": "0x8100000000000000", "status": "Defined" } } }, "vhost7": { "clientid": "0x0000001b", "physloc": "U8284.22A.21FD4BV-V1-C27", "vtds": { "vtopt3": { "backing": "cd0", "bdphysloc": "U78CB.001.WZS09RT-P2-D15", "lun": "0x8100000000000000", "status": "Available" } } }, "vhost8": { "clientid": "0x00000018", "physloc": "U8284.22A.21FD4BV-V1-C29", "vtds": { "vtscsi0": { "backing": "hdisk4", "bdphysloc": "U78CD.001.FZH1998-P1-C6-T2-W500507680B215660-L0", "lun": "0x8100000000000000", "mirrored": false, "status": "Available" }, "vtscsi3": { "backing": "npiv1-rootvg", "lun": "0x8200000000000000", "status": "Available" } } }, "vhost9": { "clientid": "0x00000009", "physloc": "U8284.22A.21FD4BV-V1-C30", "vtds": { "vtscsi2": { "backing": "hdisk5", "bdphysloc": "U78CD.001.FZH1998-P1-C6-T2-W500507680B215660-L1000000000000", "lun": "0x8100000000000000", "mirrored": false, "status": "Available" } } } } } }
Report VIOS mappings as Ansible facts using
lsmap
command. Sample output: