Difference between revisions of "Ansible General Commands"

From rbachwiki
Jump to navigation Jump to search
Line 5: Line 5:
  ansible-playbook playbookname.yml --private-key ~/.ssh/keyname
  ansible-playbook playbookname.yml --private-key ~/.ssh/keyname


* Test connection to server
ansible all -u root -m ping --private-key ~/.ssh/ansible


=[[Ansible| Ansible Menu]]=
=[[Ansible| Ansible Menu]]=
[[Category:Ansible]]
[[Category:Ansible]]

Revision as of 15:25, 24 June 2022

  • list content of hosts file
ansible-inventory --list
  • Run playbook
ansible-playbook playbookname.yml --private-key ~/.ssh/keyname
  • Test connection to server
ansible all -u root -m ping --private-key ~/.ssh/ansible

Ansible Menu