Advertisement
sandervanvugt

Ansible in 3weeks july21

Jul 9th, 2021
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.48 KB | None | 0 0
  1. FEDORA:
  2. [ansible@fedora ~]$ history
  3. 1 ip a
  4. 2 sudo systemctl status sshd
  5. 3 sudo systemctl enable sshd
  6. 4 sudo dnf install python3-pip
  7. 5 pip3 install ansible --user
  8. 6 ansible --version
  9. 7 sudo systemctl enable sshd
  10. 8 sudo dnf install -y git vim
  11. 9 git clone https://github.com/sandervanvugt/ansibleinthreeweeks
  12. 10 cd ansibleinthreeweeks/
  13. 11 ls
  14. 12 cd ..
  15. 13 git clone https://github.com/sandervanvugt/luth
  16. 14 luth/countdown 12
  17. 15 sudo vim /etc/hosts
  18. 16 i pa
  19. 17 ip a
  20. 18 sudo vim /etc/hosts
  21. 19 ping ubuntu
  22. 20 vim inventory
  23. 21 #sudo useradd ansible
  24. 22 #passwd ansible
  25. 23 id
  26. 24 sudo ls -l /root
  27. 25 sudo -i
  28. 26 ansible all -i inventory -u root -k -m raw -a "useradd -G wheel ansible"
  29. 27 ansible all -i inventory -u root -k -m raw -a "useradd bob"
  30. 28 ansible ubuntu -i inventory -u ansible -k -K -m raw -a "useradd bob"
  31. 29 vim inventory
  32. 30 sudo /tmp/sudoers /etc/sudoers.d/ansible
  33. 31 sudo cp /tmp/sudoers /etc/sudoers.d/ansible
  34. 32 sudo ls -l /root
  35. 33 ssh-keygen
  36. 34 ssh-copy-id fedora
  37. 35 ssh-copy-id rocky
  38. 36 ssh-copy-id rhel8
  39. 37 ssh-copy-id centos7
  40. 38 ansible rocky,rhel8,centos7 -i inventory -u root -k -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
  41. 39 history
  42. 40 sudo systemctl status sshd
  43. 41 sudo systemctl enable --now sshd
  44. 42 ansible rhelfamily -i inventory -u root -k -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
  45. 43 vim inventory
  46. 44 ansible rhelfamily -i inventory -u root -k -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
  47. 45 ansible rhelfamily -u root -k -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
  48. 46 cat inventory
  49. 47 history
  50. 48 ansible centos7 -i inventory -u ansible -m command -a "id"
  51. 49 vim ansible.cfg
  52. 50 ansible centos7 -m command -a "id"
  53. 51 cat ansible.cfg
  54. 52 luth/countdown 12
  55. 53 cat ansible.cfg
  56. 54 cat inventory
  57. 55 sudo vim /etc/ansible/hosts
  58. 56 ls -a
  59. 57 cd .ansible/
  60. 58 ls
  61. 59 cd cp
  62. 60 ls
  63. 61 cd ../..
  64. 62 find / -name "hosts"
  65. 63 sudo find / -name "hosts" 2>/dev/null
  66. 64 history | grep '^ansible'
  67. 65 history
  68. 66 history | grep 'ansible'
  69. 67 cat /etc/hosts
  70. 68 history | grep ansible
  71. 69 history | grep copy
  72. 70 ansible rocky -m copy -a "src=/etc/hosts dest=/etc/hosts"
  73. 71 cat inventory
  74. 72 ansible rocky -m copy -a "src=inventory dest=/home/ansible"
  75. 73 ansible rocky -m copy -a "src=ansible.cfg dest=/home/ansible"
  76. 74 history
  77. 75 ansible-doc copy
  78. 76 luth/countdown 18
  79. 77 ls
  80. 78 luth/countdown 12
  81. 79 history
  82.  
  83. ROCKY[ansible@a3wrcontrol base]$ history
  84. 1 sudo vim /etc/ansible/hosts
  85. 2 sudo dnf install -y vim git
  86. 3 git clone https://github.com/sandervanvugt/ansibleinthreeweeks
  87. 4 cd ansibleinthreeweeks/
  88. 5 ls
  89. 6 cd cisco/
  90. 7 ls
  91. 8 cat inventory
  92. 9 cd ../windows/
  93. 10 cat inventory
  94. 11 ansible --version
  95. 12 cd
  96. 13 ansible --version
  97. 14 vim /etc/ansible/ansible.cfg
  98. 15 cd -
  99. 16 ansible --version
  100. 17 ansible-doc -l
  101. 18 ansible-doc -l | wc
  102. 19 cd..
  103. 20 cd ..
  104. 21 cd
  105. 22 ansible all -m ping
  106. 23 ssh-keygen
  107. 24 ssh-copy-id rocky
  108. 25 ssh-copy-id fedora
  109. 26 ssh-copy-id ubuntu
  110. 27 ssh-copy-id centos7
  111. 28 ssh-copy-id rhel8
  112. 29 ansible all -m ping
  113. 30 cat inventory
  114. 31 ansible rhelfamily -m command -a "useradd lisa"
  115. 32 ansible rhelfamily -m user -a "name=linda"
  116. 33 history
  117. 34 cat ansible.cfg
  118. 35 ansible ubuntu -K -m package -a "name=nmap"
  119. 36 cat /etc/hosts
  120. 37 ansible ubuntu -K -m package -a "name=nmap"
  121. 38 ssh-copy-id ubuntu
  122. 39 ansible ubuntu -K -m package -a "name=nmap"
  123. 40 history
  124. 41 git clone https://github.com/sandervanvugt/ansible-3h
  125. 42 cd ansible-3h/
  126. 43 ls
  127. 44 cd install/
  128. 45 ls
  129. 46 cd ../..
  130. 47 find . -name "install_and*"
  131. 48 cd ansible-3h/
  132. 49 cd install/
  133. 50 vim vsftpd.yml
  134. 51 ansible-playbook vsftpd.yml
  135. 52 ls
  136. 53 cat inventory
  137. 54 ansible-playbook -i ../../ansibleinthreeweeks/inventory vsftpd.yml
  138. 55 cp ../../ansibleinthreeweeks/inventory .
  139. 56 vim inventory
  140. 57 ansible-playbook vsftpd.yml
  141. 58 vim inventory
  142. 59 ansible-playbook vsftpd.yml
  143. 60 vim vsftpd.yml
  144. 61 ansible-playbook vsftpd.yml
  145. 62 cat vsftpd.yml
  146. 63 ansible-doc yum
  147. 64 ansible-doc copy
  148. 65 vim vsftpd.yml
  149. 66 ansible-playbook --syntax-check vsftpd.yml
  150. 67 ansible-playbook vsftpd.yml
  151. 68 ansible-playbook --syntax-check vsftpd.yml
  152. 69 vim vsftpd.yml
  153. 70 ansible-playbook --syntax-check vsftpd.yml -v
  154. 71 ansible-playbook --syntax-check vsftpd.yml -vv
  155. 72 ansible-playbook --syntax-check vsftpd.yml -vvv
  156. 73 ansible-playbook vsftpd.yml -vvv
  157. 74 ansible-playbook vsftpd.yml -vvvv
  158. 75 ansible-doc user
  159. 76 ansible-doc yum
  160. 77 ansible-doc -l | grep ufw
  161. 78 ansible-doc -l | grep firewall
  162. 79 ansible-doc ufw
  163. 80 cd ../..
  164. 81 find . -name "run_and_test_httpd.yaml"
  165. 82 ls
  166. 83 git clone https://github.com/sandervanvugt/ansible-advanced
  167. 84 find . -name "run_and_test_httpd.yaml"
  168. 85 cd ansible-3h/
  169. 86 cd base
  170. 87 ls
  171. 88 vim installpackage.yaml
  172. 89 ip a
  173. 90 cd..
  174. 91 cd ..
  175. 92 ;s
  176. 93 ls
  177. 94 cd ansible-3h/
  178. 95 cd base/
  179. 96 ls
  180. 97 vim variables.yml
  181. 98 vim installpackage.yaml
  182. 99 ansible-playbook installpackage.yaml
  183. 100 vim inventory
  184. 101 ansible-playbook installpackage.yaml
  185. 102 vim inventory
  186. 103 cat installpackage.yaml
  187. 104 ansible-playbook --help | less
  188. 105 ansible-playbook installpackage.yaml -e package=nmap
  189. 106 ls
  190. 107 vim variables.yml
  191. 108 ansible-playbook variables.yml
  192. 109 vim variables.yml
  193. 110 ansible centos7 -m setup | less
  194. 111 ls
  195. 112 head installpackage.yaml
  196. 113 head variables.yml
  197. 114 ansible-doc -l | grep facts
  198. 115 ansible-doc -l | grep facts | wc
  199. 116 ls
  200. 117 vim thefacts.yaml
  201. 118 ansible-playbook thefacts.yaml
  202. 119 vim thefacts.yaml
  203. 120 ansible-playbook thefacts.yaml
  204. 121 ls
  205. 122 vim when-test.yml
  206. 123 ansible-playbook when-test.yml
  207. 124 vim when-test.yml
  208. 125 vim inventory
  209. 126 vim when-test.yml
  210. 127 ansible-playbook when-test.yml
  211. 128 vim when-test.yml
  212. 129 ansible-playbook when-test.yml
  213. 130 history
  214.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement