Advertisement
sandervanvugt

Untitled

Nov 19th, 2020
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. [ansible@control install]$ history
  2. 1 su -
  3. 2 exit
  4. 3 id
  5. 4 sudo yum install epel-release -y
  6. 5 sudo yum install -y ansible
  7. 6 ansible --version
  8. 7 ssh-keygen
  9. 8 ssh-copy-id ansible1
  10. 9 sudo vim /etc/hosts
  11. 10 sudo vi /etc/hosts
  12. 11 ssh-copy-id ansible1
  13. 12 ssh ansible1
  14. 13 ssh-copy-id ansible2
  15. 14 mkdir install
  16. 15 cd install/
  17. 16 vi inventory
  18. 17 ansible all -i inventory --list-hosts
  19. 18 history
  20. [ansible@control install]$
  21.  
  22. [root@control ~]# history
  23. 1 visudo
  24. 2 id ansible
  25. 3 usermod -aG wheel ansible
  26. 4 exit
  27. 5 history
  28.  
  29. AFTER TYPING VISUDO
  30. ## Allows people in group wheel to run all commands
  31. #%wheel ALL=(ALL) ALL
  32.  
  33. ## Same thing without a password
  34. %wheel ALL=(ALL) NOPASSWD: ALL
  35.  
  36. INVENTORY CONTENT-bash: vim: command not found
  37. [ansible@control install]$ vi inventory
  38.  
  39. control
  40. ansible1
  41. ansible2
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement