sandervanvugt

RHCE aug20 day2 history

Aug 25th, 2020
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.99 KB | None | 0 0
  1. 1 ssh-keygen
  2. 2 ssh-copy-id ansible1
  3. 3 ssh-copy-id ansible2
  4. 4 ssh ansible2
  5. 5 exit
  6. 6 sudo git install https://github.com/sandervanvugt/rhce8-live
  7. 7 sudo git clone https://github.com/sandervanvugt/rhce8-live
  8. 8 sudo git clone https://github.com/sandervanvugt/rhce8-book
  9. 9 cd rhce8-live/
  10. 10 ls
  11. 11 ./countdown 13
  12. 12 ansible --version
  13. 13 sudo yum install -y ansible
  14. 14 ansible --version
  15. 15 ls
  16. 16 history
  17. 17 cd lesson2/
  18. 18 ls
  19. 19 vim inventory
  20. 20 ansible -i inventory all --list-hosts
  21. 21 ansible all --list-hosts
  22. 22 mv inventory minventory
  23. 23 sudo mv inventory minventory
  24. 24 ansible all --list-hosts
  25. 25 ansible all -i minventory --list-hosts
  26. 26 cat ansible.cfg
  27. 27 sudo vim /etc/ansible/hosts
  28. 28 ansible file --list-hosts
  29. 29 ansible -i inventory file --list-hosts
  30. 30 ansible -i minventory file --list-hosts
  31. 31 cat minventory
  32. 32 ansible -i minventory web --list-hosts
  33. 33 cat minventory
  34. 34 vim ansible.cfg
  35. 35 sudo vim /etc/ansible/hosts
  36. 36 sudo vim /etc/ansible/ansible.cfg
  37. 37 ls
  38. 38 vim ansible.cfg
  39. 39 ls -l
  40. 40 cd ..
  41. 41 sudo chown -R ansible:ansible *
  42. 42 ls -l
  43. 43 cd lesson
  44. 44 cd lesson2/
  45. 45 ls
  46. 46 vim ansible.cfg
  47. 47 ansible web --list-hosts
  48. 48 vim ansible.cfg
  49. 49 ansible --version
  50. 50 ls
  51. 51 cd ..
  52. 52 ./countdown 12
  53. 53 ansible all -m user -a "name=lisa"
  54. 54 pwd
  55. 55 ls
  56. 56 cd lesson2/
  57. 57 cat ansible.cfg
  58. 58 ls
  59. 59 ansible all -m user -a "name=lisa"
  60. 60 ansible all -m command -a "id lisa"
  61. 61 ansible all -a "id lisa"
  62. 62 ansible-doc -l
  63. 63 ansible-doc -l | wc
  64. 64 ansible all -m command -a "useradd linda"
  65. 65 ansible all -m command -a "id linda"
  66. 66 ansible all -m command -a "useradd linda"
  67. 67 ansible all -m user -a "name=linda"
  68. 68 ansible-doc package
  69. 69 ansible-doc yum
  70. 70 ansible-doc dnf
  71. 71 ansible all -m ping
  72. 72 ansible all -m service -a "name=httpd state=started"
  73. 73 ansible all -m command -a "rpn -qa | grep python"
  74. 74 ansible all -m command -a "rpm -qa | grep python"
  75. 75 ansible all -m shell -a "rpm -qa | grep python"
  76. 76 ansible all -m copy -a 'content="hello world" dest=/etc/motd'
  77. 77 ansible all -m command -a "cat /etc/motd"
  78. 78 ansible --help
  79. 79 historyt
  80. 80 history
  81. 81 ansible all -m copy -a 'content="hello world" dest=/etc/motd' -C
  82. 82 ansible all -m copy -a 'content="hello moon" dest=/etc/motd' -C
  83. 83 ../countdown 12
  84. 84 vim ~/.vimrc
  85. 85 cd ../lesson4
  86. 86 ls
  87. 87 vim vsftpd.yml
  88. 88 ansible-doc copy
  89. 89 vim vsftpd.yml
  90. 90 ansible-playbook vsftpd.yml
  91. 91 ls -lrt
  92. 92 vim vsftpd.yml
  93. 93 ansible-playbook vsftpd.yml
  94. 94 vim vsftpd.yml
  95. 95 ansible-playbook vsftpd.yml
  96. 96 ansible-playbook --syntax-check vsftpd-err.yml
  97. 97 vim vsftpd-err.yml
  98. 98 ansible-playbook -C vsftpd.yml
  99. 99 ansible-playbook -vvvv vsftpd.yml
  100. 100 ansible-playbook -vv vsftpd.yml
  101. 101 vim web-setup-and-test.yml
  102. 102 ansible-doc firewalld
  103. 103 vim web-setup-and-test.yml
  104. 104 ansible-playbook web-setup-and-test.yml
  105. 105 history
  106. 106 cd ../lesson5/
  107. 107 ls
  108. 108 pwd
  109. 109 vim user.yml
  110. 110 ansible-playbook user.yml
  111. 111 vim user.yml
  112. 112 vim user.yml -e user=frank
  113. 113 ansible-playbook user.yml -e user=franck
  114. 114 sudo vim /etc/ansible/ansible.cfg
  115. 115 vim user.yml
  116. 116 ansible-playbook user.yml -e user=anna
  117. 117 vim user.yml
  118. 118 ansible-playbook user.yml
  119. 119 vim user.yml
  120. 120 ansible-playbook user.yml -e user=anna
  121. 121 ssh-copy-id localhost
  122. 122 ansible-playbook user.yml -e user=anna
  123. 123 history
  124. 124 cd ..
  125. 125 ls
  126. 126 git clone https://github.com/sandervanvugt/ansible-advanced
  127. 127 cd ansible-advanced/
  128. 128 cd windows/
  129. 129 ls
  130. 130 vim inventory
  131. 131 cd ../../rhce8-live/lesson5/
  132. 132 ls
  133. 133 cd webservers/
  134. 134 ls
  135. 135 vim site.yml
  136. 136 cd group_vars/
  137. 137 ls
  138. 138 cat ../inventory
  139. 139 cat lamp
  140. 140 cd ..
  141. 141 mkdir host_vars
  142. 142 cd host_vars/
  143. 143 vim ansible1.example.com
  144. 144 cd ..
  145. 145 vim site.yml
  146. 146 ansible-playbook site.yml
  147. 147 vim site.yml
  148. 148 tree
  149. 149 ansible localhost -m yum -a "name=tree state=installed"
  150. 150 tree
  151. 151 history
  152. 152 pwd
  153. 153 ../../countdown 18
  154. 154 sudo vim /etc/hosts
  155. 155 ping ansible3
  156. 156 ls
  157. 157 vim inventory
  158. 158 vim jp.yaml
  159. 159 cp jp.yaml jp2.yaml
  160. 160 cp jp.yaml jp3.yaml
  161. 161 vim jp.yaml
  162. 162 ansible ansible3 -m raw -a "yum install python3 -y" --become
  163. 163 ansible ansible3.example.com -m raw -a "yum install python3 -y" --become
  164. 164 ansible ansible3.example.com -m raw -a "yum install python3 -y" -u root --ask-pass
  165. 165 ansible ansible3.example.com -m user -a "name=ansible state=present" -u root --ask-pass
  166. 166 ansible ansible3.example.com -m raw -a "echo password | passwd --stdin ansible" -u root --ask-pass
  167. 167 ssh-copy-id ansible3.example.com
  168. 168 ansible ansible3.example.com -m copy -a "content='ansible ALL=(ALL) NOPASSWD: ALL' dest=/etc/sudoers.d/ansible" -u root --ask-pass
  169. 169 ansible all -m ping
  170. 170 history
  171. 171 vim newhost.sh
  172. 172 cat newhost.sh
  173. 173 ls
  174. 174 vim jp2.yaml
  175. 175 ansible-playbook jp2.yaml
  176. 176 vim inventory
  177. 177 vim jp2.yaml
  178. 178 ansible-playbook jp2.yaml
  179. 179 vim jp2.yaml
  180. 180 vim jp3.yaml
  181. 181 ansible-vault
  182. 182 pwd
  183. 183 cd ../../lesson7/
  184. 184 ls
  185. 185 cd vault/
  186. 186 ls
  187. 187 rm secret.yml
  188. 188 ansible-vault create secret.yml
  189. 189 cat secret.yml
  190. 190 ansible-vault view secret.yml
  191. 191 vim create-user.yml
  192. 192 ansible-playbook create-users.yml
  193. 193 ansible-playbook create-user.yml
  194. 194 ansible-playbook --ask-vault-pass create-user.yml
  195. 195 ansible-doc user
  196. 196 ansible all -a "tail /etc/shadow"
  197. 197 history | grep stdin
  198. 198 echo password > vault-pass
  199. 199 ansible-playbook --vault-password-file=vault-pass create-user.yml
  200. 200 cd ..
  201. 201 ../countdown 13
  202. 202 ansible ansible1.example.com -m setup > facts.txt
  203. 203 ls
  204. 204 cd facts/
  205. 205 ansible ansible1.example.com -m setup > facts.txt
  206. 206 less facts.txt
  207. 207 ls
  208. 208 rm *retry
  209. 209 ls
  210. 210 vim facts.yml
  211. 211 less facts.txt
  212. 212 ansible-playbook facts.yml | less
  213. 213 vim ipfact.yml
  214. 214 ansible-playbook ipfact.yml
  215. 215 vim ipfact.yml
  216. 216 ansible-playbook ipfact.yml
  217. 217 vim newlocalfacts.yml
  218. 218 vim localfacts.fact
  219. 219 vim newlocalfacts.yml
  220. 220 ansible-playbook newlocalfacts.yml
  221. 221 ansible ansible1.example.com -m setup -a "filter=ansible_local"
  222. 222 cd ..
  223. 223 ls
  224. 224 cd arrays/
  225. 225 ls
  226. 226 tree
  227. 227 cat vars/users-dictionary
  228. 228 cat vars/users-list
  229. 229 vim multi-list.yml
  230. 230 cat multi-list.yml
  231. 231 ansible-playbook multi-list.yml
  232. 232 cat vars/users-dictionary
  233. 233 cat multi-dictionary.yml
  234. 234 ansible-playbook multi-dictionary.yml
  235. 235 ls
  236. 236 cd ../../lesson8/
  237. 237 ls
  238. 238 vim loop-over-variable.yml
  239. 239 vim loopvars.yml
  240. 240 ansible-playbook loop-over-variable.yml
  241. 241 vim inventory
  242. 242 vim loopservices.yml
  243. 243 ansible-playbook loopservices.yml
  244. 244 vim loopservices.yml
  245. 245 vim loopusers.yml
  246. 246 ansible-playbook loopusers.yml
  247. 247 ../countdown 12
  248. 248 ls
  249. 249 vim register_loop.yml
  250. 250 ansible-playbook register_loop.yml
  251. 251 vim register_command.yml
  252. 252 ansible-playbook register_command.yml
  253. 253 vim register_command.yml
  254. 254 ansible-playbook register_command.yml -e user=lisa
  255. 255 ansible-playbook register_command.yml -e user=sander
  256. 256 vim register_command.yml
  257. 257 ansible-playbook register_command.yml -e user=sander
  258. 258 vim register_command.yml
  259. 259 vim distro.yml
  260. 260 ansible-playbook distro.yml
  261. 261 vim distro.yml
  262. 262 ansible-playbook distro.yml
  263. 263 vim quicktest.yml
  264. 264 history | grep git
  265. 265 cat distro.yml
  266. 266 vim quicktest.yml
  267. 267 ansible-playbook quicktest.yml
  268. 268 vim quicktest.yml
  269. 269 ansible-playbook quicktest.yml
  270. 270 vim quicktest.yml
  271. 271 ansible-playbook quicktest.yml
  272. 272 vim command-output-test.yml
  273. 273 vgs myvg
  274. 274 ansible localhost -a "vgs myvg"
  275. 275 ansible localhost -a "vgs"
  276. 276 ansible localhost -a "cl"
  277. 277 ansible localhost -a "vgs cl"
  278. 278 vim command-output-test.yml
  279. 279 ansible-playbook command-output-test.yml
  280. 280 vim command-output-test.yml
  281. 281 ansible-playbook command-output-test.yml
  282. 282 vim when_multiple.yml
  283. 283 ansible-playbook when_multiple.yml
  284. 284 vim when_multiple.yml
  285. 285 ansible-playbook when_multiple.yml
  286. 286 vim when_multiple.yml
  287. 287 ansible-playbook when_multiple.yml
  288. 288 vim when_multiple_complex.yml
  289. 289 ansible-playbook when_multiple_complex.yml
  290. 290 vim homework2.txt
  291. 291 history
Add Comment
Please, Sign In to add comment