Thursday, May 11, 2017

My Commands list


1) Command to check the list of hosts

# ansible-playbook file.yml --list-hosts

2)  To run a playbook yml file

# ansible-playbook <file2.yml>

3) to run adhoc command

# ansible ss -u bhr_moham607 --key-file=/home/bhr_moham607/.ssh/id_rsa -m ping

4) To list plays in a file


#  ansible-playbook --list-tasks file.yml

No comments:

Post a Comment