[root@blog ~/project1 23:44:53]$cat group_vars/all
ip_list:
- 192.168.85.251
- 192.168.85.253
- 192.168.86.252
- 192.168.85.252
[root@blog ~/project1 23:45:34]$ansible-playbook -i hosts group_vars_list.yml
PLAY [192.168.85.251] ****************************************************************************************************************
TASK [Gathering Facts] ***************************************************************************************************************
ok: [192.168.85.251]
TASK [Output Custom Variable] ********************************************************************************************************
ok: [192.168.85.251] => {
"msg": [
"192.168.85.251",
"192.168.85.253",
"192.168.86.252",
"192.168.85.252"
]
}
PLAY RECAP ***************************************************************************************************************************
192.168.85.251 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
[root@blog ~/project1 23:45:44]$