ansible first command code example
Example 1: Ansible ping hosts
$ ansible <hostgroup-name> -m ping
Example 2: run ansible yaml file
ansible-playbook playbook.yml
$ ansible <hostgroup-name> -m ping
ansible-playbook playbook.yml