sandervanvugt

Untitled

Aug 26th, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.54 KB | None | 0 0
  1. [ansible@control lesson13]$ history
  2. 1 ssh-keygen
  3. 2 ssh-copy-id ansible1
  4. 3 ssh-copy-id ansible2
  5. 4 ssh ansible2
  6. 5 exit
  7. 6 sudo git install https://github.com/sandervanvugt/rhce8-live
  8. 7 sudo git clone https://github.com/sandervanvugt/rhce8-live
  9. 8 sudo git clone https://github.com/sandervanvugt/rhce8-book
  10. 9 cd rhce8-live/
  11. 10 ls
  12. 11 ./countdown 13
  13. 12 ansible --version
  14. 13 sudo yum install -y ansible
  15. 14 ansible --version
  16. 15 ls
  17. 16 history
  18. 17 cd lesson2/
  19. 18 ls
  20. 19 vim inventory
  21. 20 ansible -i inventory all --list-hosts
  22. 21 ansible all --list-hosts
  23. 22 mv inventory minventory
  24. 23 sudo mv inventory minventory
  25. 24 ansible all --list-hosts
  26. 25 ansible all -i minventory --list-hosts
  27. 26 cat ansible.cfg
  28. 27 sudo vim /etc/ansible/hosts
  29. 28 ansible file --list-hosts
  30. 29 ansible -i inventory file --list-hosts
  31. 30 ansible -i minventory file --list-hosts
  32. 31 cat minventory
  33. 32 ansible -i minventory web --list-hosts
  34. 33 cat minventory
  35. 34 vim ansible.cfg
  36. 35 sudo vim /etc/ansible/hosts
  37. 36 sudo vim /etc/ansible/ansible.cfg
  38. 37 ls
  39. 38 vim ansible.cfg
  40. 39 ls -l
  41. 40 cd ..
  42. 41 sudo chown -R ansible:ansible *
  43. 42 ls -l
  44. 43 cd lesson
  45. 44 cd lesson2/
  46. 45 ls
  47. 46 vim ansible.cfg
  48. 47 ansible web --list-hosts
  49. 48 vim ansible.cfg
  50. 49 ansible --version
  51. 50 ls
  52. 51 cd ..
  53. 52 ./countdown 12
  54. 53 ansible all -m user -a "name=lisa"
  55. 54 pwd
  56. 55 ls
  57. 56 cd lesson2/
  58. 57 cat ansible.cfg
  59. 58 ls
  60. 59 ansible all -m user -a "name=lisa"
  61. 60 ansible all -m command -a "id lisa"
  62. 61 ansible all -a "id lisa"
  63. 62 ansible-doc -l
  64. 63 ansible-doc -l | wc
  65. 64 ansible all -m command -a "useradd linda"
  66. 65 ansible all -m command -a "id linda"
  67. 66 ansible all -m command -a "useradd linda"
  68. 67 ansible all -m user -a "name=linda"
  69. 68 ansible-doc package
  70. 69 ansible-doc yum
  71. 70 ansible-doc dnf
  72. 71 ansible all -m ping
  73. 72 ansible all -m service -a "name=httpd state=started"
  74. 73 ansible all -m command -a "rpn -qa | grep python"
  75. 74 ansible all -m command -a "rpm -qa | grep python"
  76. 75 ansible all -m shell -a "rpm -qa | grep python"
  77. 76 ansible all -m copy -a 'content="hello world" dest=/etc/motd'
  78. 77 ansible all -m command -a "cat /etc/motd"
  79. 78 ansible --help
  80. 79 historyt
  81. 80 history
  82. 81 ansible all -m copy -a 'content="hello world" dest=/etc/motd' -C
  83. 82 ansible all -m copy -a 'content="hello moon" dest=/etc/motd' -C
  84. 83 ../countdown 12
  85. 84 vim ~/.vimrc
  86. 85 cd ../lesson4
  87. 86 ls
  88. 87 vim vsftpd.yml
  89. 88 ansible-doc copy
  90. 89 vim vsftpd.yml
  91. 90 ansible-playbook vsftpd.yml
  92. 91 ls -lrt
  93. 92 vim vsftpd.yml
  94. 93 ansible-playbook vsftpd.yml
  95. 94 vim vsftpd.yml
  96. 95 ansible-playbook vsftpd.yml
  97. 96 ansible-playbook --syntax-check vsftpd-err.yml
  98. 97 vim vsftpd-err.yml
  99. 98 ansible-playbook -C vsftpd.yml
  100. 99 ansible-playbook -vvvv vsftpd.yml
  101. 100 ansible-playbook -vv vsftpd.yml
  102. 101 vim web-setup-and-test.yml
  103. 102 ansible-doc firewalld
  104. 103 vim web-setup-and-test.yml
  105. 104 ansible-playbook web-setup-and-test.yml
  106. 105 history
  107. 106 cd ../lesson5/
  108. 107 ls
  109. 108 pwd
  110. 109 vim user.yml
  111. 110 ansible-playbook user.yml
  112. 111 vim user.yml
  113. 112 vim user.yml -e user=frank
  114. 113 ansible-playbook user.yml -e user=franck
  115. 114 sudo vim /etc/ansible/ansible.cfg
  116. 115 vim user.yml
  117. 116 ansible-playbook user.yml -e user=anna
  118. 117 vim user.yml
  119. 118 ansible-playbook user.yml
  120. 119 vim user.yml
  121. 120 ansible-playbook user.yml -e user=anna
  122. 121 ssh-copy-id localhost
  123. 122 ansible-playbook user.yml -e user=anna
  124. 123 history
  125. 124 cd ..
  126. 125 ls
  127. 126 git clone https://github.com/sandervanvugt/ansible-advanced
  128. 127 cd ansible-advanced/
  129. 128 cd windows/
  130. 129 ls
  131. 130 vim inventory
  132. 131 cd ../../rhce8-live/lesson5/
  133. 132 ls
  134. 133 cd webservers/
  135. 134 ls
  136. 135 vim site.yml
  137. 136 cd group_vars/
  138. 137 ls
  139. 138 cat ../inventory
  140. 139 cat lamp
  141. 140 cd ..
  142. 141 mkdir host_vars
  143. 142 cd host_vars/
  144. 143 vim ansible1.example.com
  145. 144 cd ..
  146. 145 vim site.yml
  147. 146 ansible-playbook site.yml
  148. 147 vim site.yml
  149. 148 tree
  150. 149 ansible localhost -m yum -a "name=tree state=installed"
  151. 150 tree
  152. 151 history
  153. 152 pwd
  154. 153 ../../countdown 18
  155. 154 sudo vim /etc/hosts
  156. 155 ping ansible3
  157. 156 ls
  158. 157 vim inventory
  159. 158 vim jp.yaml
  160. 159 cp jp.yaml jp2.yaml
  161. 160 cp jp.yaml jp3.yaml
  162. 161 vim jp.yaml
  163. 162 ansible ansible3 -m raw -a "yum install python3 -y" --become
  164. 163 ansible ansible3.example.com -m raw -a "yum install python3 -y" --become
  165. 164 ansible ansible3.example.com -m raw -a "yum install python3 -y" -u root --ask-pass
  166. 165 ansible ansible3.example.com -m user -a "name=ansible state=present" -u root --ask-pass
  167. 166 ansible ansible3.example.com -m raw -a "echo password | passwd --stdin ansible" -u root --ask-pass
  168. 167 ssh-copy-id ansible3.example.com
  169. 168 ansible ansible3.example.com -m copy -a "content='ansible ALL=(ALL) NOPASSWD: ALL' dest=/etc/sudoers.d/ansible" -u root --ask-pass
  170. 169 ansible all -m ping
  171. 170 history
  172. 171 vim newhost.sh
  173. 172 cat newhost.sh
  174. 173 ls
  175. 174 vim jp2.yaml
  176. 175 ansible-playbook jp2.yaml
  177. 176 vim inventory
  178. 177 vim jp2.yaml
  179. 178 ansible-playbook jp2.yaml
  180. 179 vim jp2.yaml
  181. 180 vim jp3.yaml
  182. 181 ansible-vault
  183. 182 pwd
  184. 183 cd ../../lesson7/
  185. 184 ls
  186. 185 cd vault/
  187. 186 ls
  188. 187 rm secret.yml
  189. 188 ansible-vault create secret.yml
  190. 189 cat secret.yml
  191. 190 ansible-vault view secret.yml
  192. 191 vim create-user.yml
  193. 192 ansible-playbook create-users.yml
  194. 193 ansible-playbook create-user.yml
  195. 194 ansible-playbook --ask-vault-pass create-user.yml
  196. 195 ansible-doc user
  197. 196 ansible all -a "tail /etc/shadow"
  198. 197 history | grep stdin
  199. 198 echo password > vault-pass
  200. 199 ansible-playbook --vault-password-file=vault-pass create-user.yml
  201. 200 cd ..
  202. 201 ../countdown 13
  203. 202 ansible ansible1.example.com -m setup > facts.txt
  204. 203 ls
  205. 204 cd facts/
  206. 205 ansible ansible1.example.com -m setup > facts.txt
  207. 206 less facts.txt
  208. 207 ls
  209. 208 rm *retry
  210. 209 ls
  211. 210 vim facts.yml
  212. 211 less facts.txt
  213. 212 ansible-playbook facts.yml | less
  214. 213 vim ipfact.yml
  215. 214 ansible-playbook ipfact.yml
  216. 215 vim ipfact.yml
  217. 216 ansible-playbook ipfact.yml
  218. 217 vim newlocalfacts.yml
  219. 218 vim localfacts.fact
  220. 219 vim newlocalfacts.yml
  221. 220 ansible-playbook newlocalfacts.yml
  222. 221 ansible ansible1.example.com -m setup -a "filter=ansible_local"
  223. 222 cd ..
  224. 223 ls
  225. 224 cd arrays/
  226. 225 ls
  227. 226 tree
  228. 227 cat vars/users-dictionary
  229. 228 cat vars/users-list
  230. 229 vim multi-list.yml
  231. 230 cat multi-list.yml
  232. 231 ansible-playbook multi-list.yml
  233. 232 cat vars/users-dictionary
  234. 233 cat multi-dictionary.yml
  235. 234 ansible-playbook multi-dictionary.yml
  236. 235 ls
  237. 236 cd ../../lesson8/
  238. 237 ls
  239. 238 vim loop-over-variable.yml
  240. 239 vim loopvars.yml
  241. 240 ansible-playbook loop-over-variable.yml
  242. 241 vim inventory
  243. 242 vim loopservices.yml
  244. 243 ansible-playbook loopservices.yml
  245. 244 vim loopservices.yml
  246. 245 vim loopusers.yml
  247. 246 ansible-playbook loopusers.yml
  248. 247 ../countdown 12
  249. 248 ls
  250. 249 vim register_loop.yml
  251. 250 ansible-playbook register_loop.yml
  252. 251 vim register_command.yml
  253. 252 ansible-playbook register_command.yml
  254. 253 vim register_command.yml
  255. 254 ansible-playbook register_command.yml -e user=lisa
  256. 255 ansible-playbook register_command.yml -e user=sander
  257. 256 vim register_command.yml
  258. 257 ansible-playbook register_command.yml -e user=sander
  259. 258 vim register_command.yml
  260. 259 vim distro.yml
  261. 260 ansible-playbook distro.yml
  262. 261 vim distro.yml
  263. 262 ansible-playbook distro.yml
  264. 263 vim quicktest.yml
  265. 264 history | grep git
  266. 265 cat distro.yml
  267. 266 vim quicktest.yml
  268. 267 ansible-playbook quicktest.yml
  269. 268 vim quicktest.yml
  270. 269 ansible-playbook quicktest.yml
  271. 270 vim quicktest.yml
  272. 271 ansible-playbook quicktest.yml
  273. 272 vim command-output-test.yml
  274. 273 vgs myvg
  275. 274 ansible localhost -a "vgs myvg"
  276. 275 ansible localhost -a "vgs"
  277. 276 ansible localhost -a "cl"
  278. 277 ansible localhost -a "vgs cl"
  279. 278 vim command-output-test.yml
  280. 279 ansible-playbook command-output-test.yml
  281. 280 vim command-output-test.yml
  282. 281 ansible-playbook command-output-test.yml
  283. 282 vim when_multiple.yml
  284. 283 ansible-playbook when_multiple.yml
  285. 284 vim when_multiple.yml
  286. 285 ansible-playbook when_multiple.yml
  287. 286 vim when_multiple.yml
  288. 287 ansible-playbook when_multiple.yml
  289. 288 vim when_multiple_complex.yml
  290. 289 ansible-playbook when_multiple_complex.yml
  291. 290 vim homework2.txt
  292. 291 history
  293. 292 ls
  294. 293 vim dm.yaml
  295. 294 sudo rpm -q --last kernel
  296. 295 vim dm.yaml
  297. 296 ansible -m setup ansible1.example.com | less
  298. 297 cd ..
  299. 298 mv rhce8-live/ rhce8-live.old/
  300. 299 ls
  301. 300 git clone https://github.com/sandervanvugt/rhce8-live
  302. 301 cd rhce8-live.old/lesson8/
  303. 302 vim dm.yaml
  304. 303 cd ~/rhce8-live/lesson8/
  305. 304 ls
  306. 305 vim handlers.yml
  307. 306 ansible-playbook handlers.yml
  308. 307 mkdir /tmp/index.html
  309. 308 rmdir /tmp/index.html/
  310. 309 touch /tmp/index.html
  311. 310 ansible-playbook handlers.yml
  312. 311 vim handlers.yml
  313. 312 ansible-playbook handlers.yml
  314. 313 ansible all -m file -a "name=/var/www/html/index.html state=absent"
  315. 314 ansible-playbook handlers.yml
  316. 315 pwd
  317. 316 vim ../../rhce8-live.old/lesson8/dm.yaml
  318. 317 vim blocks.yml
  319. 318 ansible-playbook blocks.yml
  320. 319 vim blocks2.yml
  321. 320 ansible-playbook blocks2.yml
  322. 321 vim blocks2.yml
  323. 322 ansible-playbook blocks2.yml
  324. 323 ls
  325. 324 cat failure.yml
  326. 325 cat failure2.yml
  327. 326 grep failed_when *
  328. 327 pwd
  329. 328 cd ../../rhce8-live.old/lesson8/
  330. 329 vim failure2.yml
  331. 330 vim failure.yml
  332. 331 ansible-playbook failure.yml
  333. 332 vim failure.yml
  334. 333 cp failure.yml ../../rhce8-live/lesson8/
  335. 334 cd ../../rhce8-live/lesson8/
  336. 335 vim changed.yml
  337. 336 ansible-playbook changed.yml
  338. 337 vim changed.yml
  339. 338 ansible-playbook changed.yml
  340. 339 vim failure.yml
  341. 340 ansible-playbook failure.yml
  342. 341 vim failure.yml
  343. 342 vim ansible.cfg
  344. 343 ../countdown 13
  345. 344 cd ../lesson9/
  346. 345 ls
  347. 346 vim file.yml
  348. 347 ansible-playbook file.yml
  349. 348 ansible -a "ls -l /tmp/remo"
  350. 349 ansible-playbook file.yml
  351. 350 vim file.yml
  352. 351 ansible all -a "ls -l /tmp/removeme"
  353. 352 vim file.yml
  354. 353 ansible-playbook file.yml
  355. 354 ansible all -a "ls -lZ /tmp/removeme"
  356. 355 vim file.yml
  357. 356 vim copy.yml
  358. 357 ansible-playbook copy.yml
  359. 358 ls /tmp
  360. 359 md5sum /tmp/ansible1.example.com/tmp/hosts
  361. 360 cat /tmp/ansible1.example.com/tmp/hosts
  362. 361 ansible-doc copt
  363. 362 ansible-doc copy
  364. 363 ansible-doc block-in-file
  365. 364 ansible-doc block-infile
  366. 365 vim copy.yml
  367. 366 ansible-doc blockinfile
  368. 367 vim selinux.yml
  369. 368 ansible-playbook selinux.yml
  370. 369 sudo yum provides */policycoreutils-python
  371. 370 sudo yum provides */semanage
  372. 371 vim selinux.yml
  373. 372 ansible-playbook selinux.yml
  374. 373 ls
  375. 374 vim templates/vsftpd.j2
  376. 375 vim ansible.cfg
  377. 376 vim vsftpd-template.yml
  378. 377 ansible-playbook vsftpd-template.yml
  379. 378 ansible all -a "cat /etc/vsftpd/vsftpd.conf"
  380. 379 ansible-doc blockinfile
  381. 380 vim ansible.cfg
  382. 381 vim hostsfile.yml
  383. 382 vim hosts.j2
  384. 383 vim templates/hosts.j2
  385. 384 ansible-playbook hostsfile.yml
  386. 385 ansible all -a "cat /etc/hosts"
  387. 386 ../countdown 12
  388. 387 cd ../lesson11/
  389. 388 ls
  390. 389 cd roles
  391. 390 ls
  392. 391 ansible-galaxy init myrole
  393. 392 tree myrole/
  394. 393 ls
  395. 394 tree mywebhost/
  396. 395 cd ..
  397. 396 ls
  398. 397 vim apache-vhost-role.yml
  399. 398 cd roles/
  400. 399 cd mywebhost/
  401. 400 vim tasks/main.yml
  402. 401 vim handlers/main.yml
  403. 402 vim templates/vhost.conf.j2
  404. 403 vi defaults/main.yml
  405. 404 rm -rf defaults/
  406. 405 vim meta/main.yml
  407. 406 rm -rf meta/
  408. 407 rm README.md
  409. 408 rm -rf tests/
  410. 409 vim vars/main.yml
  411. 410 rm -rf vars
  412. 411 tree
  413. 412 pwd
  414. 413 cd ../..
  415. 414 ls
  416. 415 ansible-playbook apache-vhost-role.yml
  417. 416 ansible-galaxy search motd
  418. 417 ansible-galaxy search motd
  419. 418 ansible-galaxy search motd --platforms EL
  420. 419 ansible-galaxy install arillso.motd
  421. 420 ansible-galaxy list
  422. 421 ansible-galaxy install geerlingguy.nginx
  423. 422 ls
  424. 423 cd roles/
  425. 424 ls
  426. 425 cd motd/
  427. 426 ls
  428. 427 cat README.md
  429. 428 ls
  430. 429 less meta/main.yml
  431. 430 vim tasks/main.yml
  432. 431 vim templates/motd.j2
  433. 432 vim defaults/main.yml
  434. 433 pwd
  435. 434 cd ..
  436. 435 vim motd-role.yml
  437. 436 ansible-playbook motd-role.yml -e system_manager=bob
  438. 437 ansible -a "cat /etc/motd"
  439. 438 ansible all -a "cat /etc/motd"
  440. 439 ansible all -a "cat /etc/motd"Z
  441. 440 cd ~/.ansible/roles/
  442. 441 cd arillso.motd/
  443. 442 ls
  444. 443 vim tasks/main.yml
  445. 444 cd ..
  446. 445 cd geerlingguy.nginx/
  447. 446 ls
  448. 447 cd tasks/
  449. 448 vim main.yml
  450. 449 ls
  451. 450 tree
  452. 451 cd ..
  453. 452 tree
  454. 453 vim vars/RedHat.yml
  455. 454 vim defaults/main.yml
  456. 455 cd
  457. 456 cd rhce8-live
  458. 457 ./countdown 12
  459. 458 sudo yum install rhel-system-roles
  460. 459 cd /usr/share/doc/rhel-system-roles/
  461. 460 ls
  462. 461 cd selinux/
  463. 462 ls
  464. 463 vim example-selinux-playbook.yml
  465. 464 pwd
  466. 465 cd ../timesync/
  467. 466 ls
  468. 467 vim example-timesync-playbook.yml
  469. 468 tzselect
  470. 469 pwd
  471. 470 cd ~/rhce8-live/
  472. 471 ls
  473. 472 cd lesson12/
  474. 473 ls
  475. 474 vim setuptime-light.yml
  476. 475 vim group_vars/servers/timesync.yml
  477. 476 vim inventory
  478. 477 vim setuptime-light.yml
  479. 478 ansible-playbook setuptime-light.yml
  480. 479 vim inventory
  481. 480 ansible-playbook setuptime-light.yml
  482. 481 ansible-inventory --list
  483. 482 cd ../lesson13/
  484. 483 ls
  485. 484 vim pascal.py
  486. 485 ansible-inventory -i pascal.py --graph
  487. 486 ls
  488. 487 vim imports.yaml
  489. 488 ansible-playbook --list-tasks imports.yaml
  490. 489 vim imports.yaml
  491. 490 vim tasks/service.yaml
  492. 491 vim tasks/firewall.yaml
  493. 492 vim imports.yaml
  494. 493 vim includes.yml
  495. 494 ls
  496. 495 history
Add Comment
Please, Sign In to add comment