ansible adhoc command to filter change service status name code example
Example: ansible select inventory file to adhoc command
# Use flag -i and the path to the inventory.
ansible all -i=/etc/ansible/[your_inventory] -m ping
# Use flag -i and the path to the inventory.
ansible all -i=/etc/ansible/[your_inventory] -m ping