Advertisement
Guest User

Untitled

a guest
Nov 26th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. ansible --private-key /PATH/TO/PRIVATE/KEY.KEY -i INVENTORY -m shell -a "whoami" all
  2.  
  3. test-web.example.com ansible_ssh_host=X.X.X.X ansible_ssh_user=MYUSER ansible_become_method=su ansible_become_user=root ansible_become_pass=Xjdt@mdaj12
  4.  
  5. [root@server ansi]# ansible --private-key /root/MASTER/audit/key.key -i test -m shell -a "whoami" all
  6. test-web.example.com | SUCCESS | rc=0 >>
  7. MYUSER
  8.  
  9. ansible all -b --private-key /root/MASTER/audit/key.key -i test -m shell -a "whoami"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement