|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The list playbook listed the IPs of the VMs without logging their role like:
TASK: [debug ] ************************************************************
ok: [10.64.109.37] => {
"msg": "public:10.64.109.37 private:192.168.165.5"
}
ok: [10.64.109.47] => {
"msg": "public:10.64.109.47 private:192.168.165.6"
}
ok: [10.64.109.36] => {
"msg": "public:10.64.109.36 private:192.168.165.4"
}
ok: [10.64.109.215] => {
"msg": "public:10.64.109.215 private:192.168.165.2"
}
The list playbook now prints the information in a more structured way with
a list of masters, a list of nodes and the subtype of the nodes like:
TASK: [debug ] ************************************************************
ok: [localhost] => {
"msg": {
"lenaicnewlist": {
"master": [
{
"name": "10.64.109.215",
"private IP": "192.168.165.2",
"public IP": "10.64.109.215",
"subtype": "default"
}
],
"node": [
{
"name": "10.64.109.47",
"private IP": "192.168.165.6",
"public IP": "10.64.109.47",
"subtype": "compute"
},
{
"name": "10.64.109.37",
"private IP": "192.168.165.5",
"public IP": "10.64.109.37",
"subtype": "compute"
},
{
"name": "10.64.109.36",
"private IP": "192.168.165.4",
"public IP": "10.64.109.36",
"subtype": "infra"
}
]
}
}
}
|