Advertisement
sandervanvugt

Untitled

Jul 9th, 2021
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.72 KB | None | 0 0
  1. [ansible@fedora ~]$ history
  2. 1 ip a
  3. 2 sudo systemctl status sshd
  4. 3 sudo systemctl enable sshd
  5. 4 sudo dnf install python3-pip
  6. 5 pip3 install ansible --user
  7. 6 ansible --version
  8. 7 sudo systemctl enable sshd
  9. 8 sudo dnf install -y git vim
  10. 9 git clone https://github.com/sandervanvugt/ansibleinthreeweeks
  11. 10 cd ansibleinthreeweeks/
  12. 11 ls
  13. 12 cd ..
  14. 13 git clone https://github.com/sandervanvugt/luth
  15. 14 luth/countdown 12
  16. 15 sudo vim /etc/hosts
  17. 16 i pa
  18. 17 ip a
  19. 18 sudo vim /etc/hosts
  20. 19 ping ubuntu
  21. 20 vim inventory
  22. 21 #sudo useradd ansible
  23. 22 #passwd ansible
  24. 23 id
  25. 24 sudo ls -l /root
  26. 25 sudo -i
  27. 26 ansible all -i inventory -u root -k -m raw -a "useradd -G wheel ansible"
  28. 27 ansible all -i inventory -u root -k -m raw -a "useradd bob"
  29. 28 ansible ubuntu -i inventory -u ansible -k -K -m raw -a "useradd bob"
  30. 29 vim inventory
  31. 30 sudo /tmp/sudoers /etc/sudoers.d/ansible
  32. 31 sudo cp /tmp/sudoers /etc/sudoers.d/ansible
  33. 32 sudo ls -l /root
  34. 33 ssh-keygen
  35. 34 ssh-copy-id fedora
  36. 35 ssh-copy-id rocky
  37. 36 ssh-copy-id rhel8
  38. 37 ssh-copy-id centos7
  39. 38 ansible rocky,rhel8,centos7 -i inventory -u root -k -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
  40. 39 history
  41. 40 sudo systemctl status sshd
  42. 41 sudo systemctl enable --now sshd
  43. 42 ansible rhelfamily -i inventory -u root -k -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
  44. 43 vim inventory
  45. 44 ansible rhelfamily -i inventory -u root -k -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
  46. 45 ansible rhelfamily -u root -k -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
  47. 46 cat inventory
  48. 47 history
  49. 48 ansible centos7 -i inventory -u ansible -m command -a "id"
  50. 49 vim ansible.cfg
  51. 50 ansible centos7 -m command -a "id"
  52. 51 cat ansible.cfg
  53. 52 luth/countdown 12
  54. 53 cat ansible.cfg
  55. 54 cat inventory
  56. 55 sudo vim /etc/ansible/hosts
  57. 56 ls -a
  58. 57 cd .ansible/
  59. 58 ls
  60. 59 cd cp
  61. 60 ls
  62. 61 cd ../..
  63. 62 find / -name "hosts"
  64. 63 sudo find / -name "hosts" 2>/dev/null
  65. 64 history | grep '^ansible'
  66. 65 history
  67. 66 history | grep 'ansible'
  68. 67 cat /etc/hosts
  69. 68 history | grep ansible
  70. 69 history | grep copy
  71. 70 ansible rocky -m copy -a "src=/etc/hosts dest=/etc/hosts"
  72. 71 cat inventory
  73. 72 ansible rocky -m copy -a "src=inventory dest=/home/ansible"
  74. 73 ansible rocky -m copy -a "src=ansible.cfg dest=/home/ansible"
  75. 74 history
  76.  
  77.  
  78. ON ROCKY[ansible@a3wrcontrol ~]$ history
  79. 1 sudo vim /etc/ansible/hosts
  80. 2 sudo dnf install -y vim git
  81. 3 git clone https://github.com/sandervanvugt/ansibleinthreeweeks
  82. 4 cd ansibleinthreeweeks/
  83. 5 ls
  84. 6 cd cisco/
  85. 7 ls
  86. 8 cat inventory
  87. 9 cd ../windows/
  88. 10 cat inventory
  89. 11 ansible --version
  90. 12 cd
  91. 13 ansible --version
  92. 14 vim /etc/ansible/ansible.cfg
  93. 15 cd -
  94. 16 ansible --version
  95. 17 ansible-doc -l
  96. 18 ansible-doc -l | wc
  97. 19 cd..
  98. 20 cd ..
  99. 21 cd
  100. 22 ansible all -m ping
  101. 23 ssh-keygen
  102. 24 ssh-copy-id rocky
  103. 25 ssh-copy-id fedora
  104. 26 ssh-copy-id ubuntu
  105. 27 ssh-copy-id centos7
  106. 28 ssh-copy-id rhel8
  107. 29 ansible all -m ping
  108. 30 cat inventory
  109. 31 ansible rhelfamily -m command -a "useradd lisa"
  110. 32 ansible rhelfamily -m user -a "name=linda"
  111. 33 history
  112. 34 cat ansible.cfg
  113. 35 ansible ubuntu -K -m package -a "name=nmap"
  114. 36 cat /etc/hosts
  115. 37 ansible ubuntu -K -m package -a "name=nmap"
  116. 38 ssh-copy-id ubuntu
  117. 39 ansible ubuntu -K -m package -a "name=nmap"
  118. 40 history
  119.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement