Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
ansible_basic_inventory_group_hosts [2020/03/11 14:49] – created andonovjansible_basic_inventory_group_hosts [2020/03/11 15:11] (current) andonovj
Line 57: Line 57:
  
  
 +=====Check=====
 +So we can create that file:
 +<sxh bash>
 +root@DESKTOP-N65RKDP:/etc/ansible# cat hosts
 +[kerberos_master]
 +192.168.50.10
  
 +[kerberos_nodes]
 +192.168.50.11
 +192.168.50.12
 +
 +[kerberos:children]
 +kerberos_master
 +kerberos_nodes
 +
 +[kerberos:vars]
 +ansible_user=vagrant
 +ansible_password=vagrant
 +ansible_connection=ssh
 +</sxh>
 +
 +We can also execute a module against a certain group or server:
 +
 +<sxh bash>
 +root@DESKTOP-N65RKDP:/etc/ansible# ansible kerberos -m ping
 +192.168.50.10 | SUCCESS => {
 +    "changed": false,
 +    "ping": "pong"
 +}
 +192.168.50.11 | SUCCESS => {
 +    "changed": false,
 +    "ping": "pong"
 +}
 +192.168.50.12 | SUCCESS => {
 +    "changed": false,
 +    "ping": "pong"
 +}
 +root@DESKTOP-N65RKDP:/etc/ansible#
 +</sxh>
  
  • ansible_basic_inventory_group_hosts.1583938164.txt.gz
  • Last modified: 2020/03/11 14:49
  • by andonovj