sandervanvugt

Untitled

Nov 24th, 2021
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. 1 vim /etc/hosts
  2. 2 ip a
  3. 3 vim /etc/hosts
  4. 4 cat /etc/hosts
  5. 5 id ansible
  6. 6 history
  7. 7 dnf install -y epel-release
  8. 8 dnf install ansible
  9. 9 ansible --version
  10. 10 ansible ansible1 -m command -a "useradd ansible"
  11. 11 vim inventory
  12. 12 ansible -i inventory ansible1 -m command -a "useradd ansible"
  13. 13 ansible --help | less
  14. 14 ansible -i inventory ansible1 -m command -a "useradd ansible" -k
  15. 15 ansible -i inventory ansible2 -m command -a "useradd ansible" -k
  16. 16 ssh ansible2
  17. 17 ansible -i inventory ansible2 -m command -a "useradd ansible" -k
  18. 18 history
  19. 19 ansible -i inventory ansible2 -m command -a "useradd ansible" -k
  20. 20 ansible -i inventory ansible2 -m user -a "name=ansible state=present"
  21. 21 history
  22. 22 ansible -i inventory ansible2 -m command -a "rpm -qa | grep ssh" -k
  23. 23 ansible -i inventory ansible2 -m shell -a "rpm -qa | grep ssh" -k
  24. 24 echo password | passwd --stdin ansible
  25. 25 ansible -i inventory all -m shell -a "echo password | passwd --stdin ansible" -k
  26. 26 ansible-doc -l
  27. 27 ansible-doc -l |wc
  28. 28 ansible-doc copy
  29. 29 ansible -i inventory all -m copy -a 'contents="ansible ALL=(ALL) NOPASSWD: ALL" dest=/etc/sudoers.d/ansible' -k
  30. 30 ansible -i inventory all -m copy -a 'content="ansible ALL=(ALL) NOPASSWD: ALL" dest=/etc/sudoers.d/ansible' -k
  31. 31 history
  32. 32 ansible -i inventory all -m command -a "ls /root" -u ansible -k
  33. 33 ansible -i inventory all -m command -a "ls /root" -u ansible -k -b
  34. 34 history
  35.  
Advertisement
Add Comment
Please, Sign In to add comment