sandervanvugt

RHCE day3 dec21

Dec 22nd, 2021
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.57 KB | None | 0 0
  1. TASK [rhel-system-roles.selinux : Purge all SELinux port local modifications] ***********************************************
  2. skipping: [ansible2.example.com]
  3. skipping: [ansible1.example.com]
  4.  
  5. TASK [rhel-system-roles.selinux : Purge all SELinux login local modifications] **********************************************
  6. skipping: [ansible2.example.com]
  7. skipping: [ansible1.example.com]
  8.  
  9. TASK [rhel-system-roles.selinux : Set SELinux booleans] *********************************************************************
  10.  
  11. TASK [rhel-system-roles.selinux : Set SELinux file contexts] ****************************************************************
  12. changed: [ansible1.example.com] => (item={'target': '/web(/.*)?', 'setype': 'user_home_dir_t', 'ftype': 'd'})
  13. changed: [ansible2.example.com] => (item={'target': '/web(/.*)?', 'setype': 'user_home_dir_t', 'ftype': 'd'})
  14.  
  15. TASK [rhel-system-roles.selinux : Restore SELinux labels on filesystem tree] ************************************************
  16. changed: [ansible1.example.com] => (item=/web)
  17. changed: [ansible2.example.com] => (item=/web)
  18.  
  19. TASK [rhel-system-roles.selinux : Restore SELinux labels on filesystem tree in check mode] **********************************
  20. skipping: [ansible2.example.com] => (item=/web)
  21. skipping: [ansible1.example.com] => (item=/web)
  22.  
  23. TASK [rhel-system-roles.selinux : Set an SELinux label on a port] ***********************************************************
  24.  
  25. TASK [rhel-system-roles.selinux : Set linux user to SELinux user mapping] ***************************************************
  26.  
  27. TASK [rhel-system-roles.selinux : Get SELinux modules facts] ****************************************************************
  28. ok: [ansible2.example.com]
  29. ok: [ansible1.example.com]
  30.  
  31. TASK [rhel-system-roles.selinux : include_tasks] ****************************************************************************
  32. skipping: [ansible1.example.com]
  33. skipping: [ansible2.example.com]
  34.  
  35. PLAY RECAP ******************************************************************************************************************
  36. ansible1.example.com : ok=9 changed=3 unreachable=0 failed=0 skipped=15 rescued=0 ignored=0
  37. ansible2.example.com : ok=9 changed=3 unreachable=0 failed=0 skipped=15 rescued=0 ignored=0
  38.  
  39. [ansible@control lesson11]$ ansible all -a "ls -Zd /web"
  40. ansible1.example.com | CHANGED | rc=0 >>
  41. unconfined_u:object_r:user_home_dir_t:s0 /web
  42. ansible2.example.com | CHANGED | rc=0 >>
  43. unconfined_u:object_r:user_home_dir_t:s0 /web
  44. [ansible@control lesson11]$ history
  45. 1 sudo dnf install -y epel-release
  46. 2 cat /etc/redhat-release
  47. 3 sudo dnf install ansible
  48. 4 ansible --version
  49. 5 history
  50. 6 sudo dnf install vim git -y
  51. 7 git clone https://github.com/sandervanvugt/rhce8-live
  52. 8 cd rhce8-live/
  53. 9 ls
  54. 10 cd
  55. 11 ip a
  56. 12 sudo vim /etc/hosts
  57. 13 ping ansible1
  58. 14 ping ansible2
  59. 15 ssh root@ansible1
  60. 16 ssh root@ansible2
  61. 17 history
  62. 18 cd rhce8-live/
  63. 19 ls
  64. 20 ./countdown 12
  65. 21 ansible-doc -l
  66. 22 ansible-doc -l | grep user
  67. 23 mkdir setup
  68. 24 cd setup/
  69. 25 vim inventory
  70. 26 ansible-doc user
  71. 27 ansible all -m user -a "name=ansible"
  72. 28 ansible all -m user -a "name=ansible" -i inventory
  73. 29 ansible all -m user -a "name=ansible" -i inventory -k
  74. 30 ansible all -m user -a "name=bob" -i inventory -k
  75. 31 ansible all -m user -a "name=bob" -i inventory -k -u root
  76. 32 ansible all -m user -a "name=ansible state=absent" -i inventory -k -u root
  77. 33 history
  78. 34 cat inventory
  79. 35 ansible all -m command -a "tail -3 /etc/passwd"
  80. 36 ansible all -m command -a "tail -3 /etc/passwd" -i inventory
  81. 37 ansible all -m command -a "tail -3 /etc/passwd" -i inventory -u root -k
  82. 38 ansible all -m user -a "name=ansible state=present" -i inventory -k -u root
  83. 39 ssh ansible@ansible2
  84. 40 history
  85. 41 sudo -i
  86. 42 ansible -i inventory all -m command -a "rpm -qa | grep util" -u root -k
  87. 43 ansible -i inventory all -m shell -a "rpm -qa | grep util" -u root -k
  88. 44 ansible -i inventory all -m shell -a "echo password | passwd --stdin ansible" -u root -k
  89. 45 ssh ansible@ansible1
  90. 46 ansible -i inventory all -m command -a "chown -R ansible:ansible /home/ansible" -u root -k
  91. 47 ansible -i inventory all -m command -a "ls -al /home/ansible" -u root -k
  92. 48 ssh ansible1
  93. 49 ssh ansible2
  94. 50 sudo vim /etc/hosts
  95. 51 history
  96. 52 ansible-doc copy
  97. 53 history
  98. 54 ansible -i inventory all -m copy -a 'content="ansible ALL=(ALL) NOPASSWD: ALL" -dest=/etc/sudoers.d/ansible' -u root -k
  99. 55 cat ~/.ssh/known_hosts
  100. 56 rm -f ~/.ssh/known_hosts
  101. 57 ansible -i inventory all -m copy -a 'content="ansible ALL=(ALL) NOPASSWD: ALL" -dest=/etc/sudoers.d/ansible' -u root -k
  102. 58 ssh ansible1
  103. 59 ssh ansible2
  104. 60 cat ~/.ssh/known_hosts
  105. 61 ansible -i inventory all -m copy -a 'content="ansible ALL=(ALL) NOPASSWD: ALL" -dest=/etc/sudoers.d/ansible' -u root -k
  106. 62 ansible -i inventory all -m copy -a 'content="ansible ALL=(ALL) NOPASSWD: ALL" dest=/etc/sudoers.d/ansible' -u root -k
  107. 63 ansible -i inventory all -m user -a "name=bob" -u ansible -k
  108. 64 ansible -i inventory all -m user -a "name=alice" -u ansible -k
  109. 65 ansible -i inventory all -m user -a "name=alice" -u ansible -k -b
  110. 66 ssh-keygen
  111. 67 ssh-copy-id ansible1
  112. 68 ssh-copy-id ansible2
  113. 69 ansible -i inventory all -m user -a "name=bob state=absent" -u ansible -b
  114. 70 history
  115. 71 ../countdown 12
  116. 72 sudo vim /etc/ansible/hosts
  117. 73 cd ../
  118. 74 ls
  119. 75 cd lesson2/
  120. 76 ls
  121. 77 cat inventory
  122. 78 ansible -i inventory all --list-hosts
  123. 79 ansible -i inventory web --list-hosts
  124. 80 vim ansible.cfg
  125. 81 sudo vim /etc/ansible/ansible.cfg
  126. 82 pwd
  127. 83 vim ansible.cfg
  128. 84 ansible all -m command -a "chown -R ansible:ansible /home/ansible"
  129. 85 vim ansible.cfg
  130. 86 ansible all -m command -a "chown -R ansible:ansible /home/ansible"
  131. 87 ansible --version
  132. 88 vim ansible.cfg
  133. 89 ansible localhost -m user -a "name=lisa"
  134. 90 vim ansible.cfg
  135. 91 sudo visudo
  136. 92 ansible localhost -m user -a "name=lisa"
  137. 93 echo $EDITOR
  138. 94 EDIT=/usr/bin/nano
  139. 95 export EDITOR=/usr/bin/nano
  140. 96 alias nanosudo=visudo
  141. 97 nanosudo
  142. 98 sudo nanosudo
  143. 99 ansible all -a "id lisa"
  144. 100 vim inventory
  145. 101 ansible all -m user -a "name=linda"
  146. 102 ansible all -m command -a "useradd bill"
  147. 103 ansible all -m user -a "name=bill"
  148. 104 history
  149. 105 ansible-doc user
  150. 106 ../countdown 15
  151. 107 ansible all -m package -a "name=nmap state=latest"
  152. 108 ansible all -m shell -a "rpm -qa | grep nmap"
  153. 109 ansible all -m service -a "name=httpd state=started"
  154. 110 cd ../lesson4/
  155. 111 ls
  156. 112 vim install-httpd.yml
  157. 113 ansible-doc copy
  158. 114 ansible-doc sync
  159. 115 ansible-doc -l | grep sync
  160. 116 ansible-doc synchronize
  161. 117 ls
  162. 118 vim vsftpd.yml
  163. 119 ansible-playbook vsftpd.yml
  164. 120 vim vsftpd.yml
  165. 121 ansible-doc service
  166. 122 vim vsftpd.yml
  167. 123 ansible-playbook vsftpd.yml
  168. 124 vim vsftpd.yml
  169. 125 ansible-playbook vsftpd.yml
  170. 126 vim vsftpd.yml
  171. 127 ansible-playbook -v vsftpd.yml
  172. 128 vim vsftpd.yml
  173. 129 ansible-playbook -v vsftpd.yml
  174. 130 ansible-playbook -vvvv vsftpd.yml
  175. 131 ansible-doc chkconfig
  176. 132 which chkconfig
  177. 133 ls -l /usr/sbin/chkconfig
  178. 134 sudo dnf provides */ansible-lint
  179. 135 sudo dnf install python3-ansible-lint
  180. 136 ansible-lint vsftpd.yml
  181. 137 ansible --syntax-check vsftpd.yml
  182. 138 ansible -C vsftpd.yml
  183. 139 ansible-playbook --syntax-check vsftpd.yml
  184. 140 history
  185. 141 history | less
  186. 142 cd ../lesson5/
  187. 143 ls
  188. 144 vim user.yml
  189. 145 ansible-playbook user.yml
  190. 146 vim user.yml
  191. 147 ansible-playbook user.yml
  192. 148 vim user.yml
  193. 149 vim inventory
  194. 150 ansible-playbook user.yml -e user=anna
  195. 151 vim user.yml
  196. 152 ansible-playbook user.yml -e user=anna
  197. 153 cd ../..
  198. 154 git clone https://github.com/sandervanvugt/ansibleinthreeweeks
  199. 155 cd ansibleinthreeweeks/
  200. 156 cd windows/
  201. 157 vim inventory
  202. 158 cd ../azure/
  203. 159 cd ../aws
  204. 160 cd ..
  205. 161 cd ../rhce8-live/lesson5/
  206. 162 ls
  207. 163 cd webservers/
  208. 164 ls
  209. 165 vim site.yml
  210. 166 cat inventory
  211. 167 ls group_vars/
  212. 168 cat group_vars/lamp
  213. 169 ansible-playbook site.yml
  214. 170 cd ../../..
  215. 171 cd ansibleinthreeweeks/
  216. 172 grep -R 'vars:'
  217. 173 cd cisco/
  218. 174 vim inventory-ios
  219. 175 cd ../../rhce8-live/lesson5/
  220. 176 ls
  221. 177 cat install_services.yml
  222. 178 cat packages.fact
  223. 179 cd ../lesson4/
  224. 180 ls
  225. 181 vim install-httpd.yml
  226. 182 cp install-httpd.yml uninstall-httpd.yml
  227. 183 vim uninstall-httpd.yml
  228. 184 ansible-playbook uninstall-httpd.yml
  229. 185 vim uninstall-httpd.yml
  230. 186 ansible-playbook uninstall-httpd.yml
  231. 187 vim uninstall-httpd.yml
  232. 188 ansible-playbook uninstall-httpd.yml
  233. 189 vim install-httpd.yml
  234. 190 ansible-playbook install-httpd.yml
  235. 191 ansible-playbook uninstall-httpd.yml
  236. 192 cd ../lesson7/
  237. 193 ansible-vault --help
  238. 194 ansible-vault create secrets.yaml
  239. 195 export EDITOR=/usr/bin/vim
  240. 196 alias
  241. 197 unalias nanosudo
  242. 198 cat secrets.yaml
  243. 199 ls
  244. 200 rm secrets.yaml
  245. 201 ansible-vault create secret.yml
  246. 202 mv secret.yml vault/
  247. 203 cd vault/
  248. 204 ls
  249. 205 vim create-user.yml
  250. 206 ansible-playbook create-user.yml
  251. 207 ansible-playbook --ask-vault-pass create-user.yml
  252. 208 ansible ansible2.example.com -a "tail -2 /etc/shadow"
  253. 209 echo password > vault-pass
  254. 210 rm vault-pass
  255. 211 echo password > ~/vault-pass
  256. 212 vim create-user.yml
  257. 213 ansible-playbook --vault-password-file=../../vault-pass create-user.yml
  258. 214 ansible-playbook --vault-password-file=../../../vault-pass create-user.yml
  259. 215 ansible-playbook --vault-password-file=~/vault-pass create-user.yml
  260. 216 vim lab4.txt
  261. 217 vim dg.yaml
  262. 218 ../../countdown 5
  263. 219 vim ansible1.fact
  264. 220 vim lab5.yaml
  265. 221 ansible-playbook lab5.yaml
  266. 222 vim lab5.yaml
  267. 223 ansible-playbook lab5.yaml
  268. 224 ansible ansible1.example.com -m setup -a "filter=ansible_local"
  269. 225 cat lab5.yaml
  270. 226 cat ansible1
  271. 227 cat ansible1.fact
  272. 228 eixt
  273. 229 exit
  274. 230 ../../countdown 15
  275. 231 vim setupfactcache.yaml
  276. 232 ansible-playbook setupfactcache.yaml
  277. 233 pwd
  278. 234 ip a
  279. 235 ls
  280. 236 pwd
  281. 237 ../../countdown 12
  282. 238 ansible-doc copy
  283. 239 ansible-doc firewalld
  284. 240 ansible-doc file
  285. 241 history | less
  286. 242 pwd
  287. 243 vim dg.yaml
  288. 244 cd ../lesson7/
  289. 245 ansible ansible1.example.com -m setup > facts.txt
  290. 246 ls
  291. 247 cd facts
  292. 248 ls
  293. 249 ansible ansible1.example.com -m setup > facts.txt
  294. 250 less facts.txt
  295. 251 ansible-doc -l | grep fact
  296. 252 pwd
  297. 253 vim ../../ansible.cfg
  298. 254 cp ../../lesson5/ansible.cfg
  299. 255 cp ../../lesson5/ansible.cfg ../../
  300. 256 vim ../../ansible.cfg
  301. 257 cp ../../ansible.cfg .
  302. 258 sudo dnf install -y redis
  303. 259 sudo systemctl enable --now redis
  304. 260 sudo pip3 install redis
  305. 261 ansible all -m setup
  306. 262 ls
  307. 263 vim facts.yml
  308. 264 cat ansible.cfg
  309. 265 ansible-playbook facts.yml
  310. 266 cat facts.yml
  311. 267 sudo systemctl status redis
  312. 268 history
  313. 269 cat ansible.cfg
  314. 270 cd
  315. 271 mv rhce8-live rhce8-live.old
  316. 272 git clone https://github.com/sandervanvugt/rhce8-live
  317. 273 cd rhce8-live/lesson7/facts/
  318. 274 l;s
  319. 275 ls
  320. 276 vim ipfact.yml
  321. 277 ansible-playbook ipfact.yml
  322. 278 vim ipfact.yml
  323. 279 ansible-playbook ipfact.yml
  324. 280 cat ipfact.yml
  325. 281 ls
  326. 282 vim newlocalfacts.yml
  327. 283 vim localfacts.fact
  328. 284 ansible-playbook newlocalfacts.yml
  329. 285 ansible all -m setup -a "filter=ansible_local"
  330. 286 vim localfacts.fact
  331. 287 history
  332. 288 cat localfacts.fact
  333. 289 cat newlocalfacts.yml
  334. 290 cd ../arrays/
  335. 291 ls
  336. 292 cat vars/users-dictionary
  337. 293 cat vars/users-list
  338. 294 vim multi-list.yml
  339. 295 ansible-playbook multi-list.yml
  340. 296 vim multi-dictionary.yml
  341. 297 ansible-playbook multi-dictionary.yml
  342. 298 cd ../..
  343. 299 ./countdown 12
  344. 300 ls
  345. 301 vim loop-over-dict.yaml
  346. 302 mv loop-over-dict.yaml lesson7/arrays/
  347. 303 cd lesson7/arrays/
  348. 304 vim loop-over-dict.yaml
  349. 305 cat vars/users-dictionary
  350. 306 vim loop-over-dict.yaml
  351. 307 ansible-playbook loop-over-dict.yaml
  352. 308 cd ../..
  353. 309 ls
  354. 310 cd lesson8/
  355. 311 ls
  356. 312 vim loopservices.yml
  357. 313 ansible-playbook loopservices.yml
  358. 314 ansible-doc yum
  359. 315 ansible-doc package
  360. 316 vim loopusers.yml
  361. 317 vim loop-over-variable.yml
  362. 318 cat loopvars.yml
  363. 319 ansible-playbook loop-over-variable.yml
  364. 320 vim register_loop.yml
  365. 321 ansible-playbook register_loop.yml
  366. 322 vim register_loop.yml
  367. 323 ansible-playbook register_loop.yml
  368. 324 vim register_command.yml
  369. 325 ansible-playbook register_command.yml
  370. 326 vim register_command.yml
  371. 327 ansible-playbook register_command.yml
  372. 328 history
  373. 329 exit
  374. 330 history
  375. 331 cd rhce8-live
  376. 332 cd lesson8/
  377. 333 ;s
  378. 334 ls
  379. 335 cd ../lesson5/
  380. 336 ls
  381. 337 vim ansible.cfg
  382. 338 sudo vim /etc/ansible/ansible.cfg
  383. 339 vim ansible.cfg
  384. 340 sudo vim /etc/ansible/ansible.cfg
  385. 341 time all -m setup
  386. 342 time ansible all -m setup
  387. 343 vim ansible.cfg
  388. 344 time ansible all -m setup
  389. 345 ls
  390. 346 vim packages.fact
  391. 347 vim install_services.yml
  392. 348 vim user.yml
  393. 349 ansible-playbook user.yml
  394. 350 vim user.yml
  395. 351 ansible-playbook user.yml
  396. 352 vim user.yml
  397. 353 ansible-playbook user.yml
  398. 354 vim global-update-ansible-cfg.yaml
  399. 355 ansible-playbook global-update-ansible-cfg.yaml
  400. 356 vim global-update-ansible-cfg.yaml
  401. 357 ansible-playbook global-update-ansible-cfg.yaml
  402. 358 vim global-update-ansible-cfg.yaml
  403. 359 ansible-playbook global-update-ansible-cfg.yaml
  404. 360 vim global-update-ansible-cfg.yaml
  405. 361 ansible-playbook global-update-ansible-cfg.yaml
  406. 362 vim global-update-ansible-cfg.yaml
  407. 363 ansible-playbook global-update-ansible-cfg.yaml
  408. 364 vim global-update-ansible-cfg.yaml
  409. 365 ansible-playbook global-update-ansible-cfg.yaml
  410. 366 vim global-update-ansible-cfg.yaml
  411. 367 ansible-playbook global-update-ansible-cfg.yaml
  412. 368 vim global-update-ansible-cfg.yaml
  413. 369 ansible-playbook global-update-ansible-cfg.yaml
  414. 370 vim global-update-ansible-cfg.yaml
  415. 371 ansible-playbook global-update-ansible-cfg.yaml
  416. 372 vim global-update-ansible-cfg.yaml
  417. 373 ansible-playbook global-update-ansible-cfg.yaml
  418. 374 vim global-update-ansible-cfg.yaml
  419. 375 ansible-playbook global-update-ansible-cfg.yaml
  420. 376 vim global-update-ansible-cfg.yaml
  421. 377 cd ../lesson7/facts/
  422. 378 ls
  423. 379 cat changeconfig.yaml
  424. 380 pwd
  425. 381 ls
  426. 382 cat setupfactcache.yaml
  427. 383 vim changeconfig.yaml
  428. 384 ansible-playbook changeconfig.yaml
  429. 385 vim ansible.cfg
  430. 386 ansible-playbook changeconfig.yaml
  431. 387 less ../../lesson5/ansible.cfg
  432. 388 vim changeconfig.yaml
  433. 389 ansible-playbook changeconfig.yaml
  434. 390 less ../../lesson5/ansible.cfg
  435. 391 vim ansible.cfg
  436. 392 cd ../../lesson5/
  437. 393 ls
  438. 394 time ansible all -m setup
  439. 395 vim ansible.cfg
  440. 396 cd ../lesson7/facts/
  441. 397 ls
  442. 398 vim checkcache.py
  443. 399 ./checkcache.py
  444. 400 cd ../../lesson5/
  445. 401 vim user.yml
  446. 402 ansible-playbook user.yml
  447. 403 cd ../lesson7/facts/
  448. 404 ls
  449. 405 cd ../../lesson8/
  450. 406 ls
  451. 407 vim distro.yml
  452. 408 ansible-playbook distro.yml -e mypackage=nmap
  453. 409 vim distro.yml
  454. 410 ansible-playbook distro.yml -e mypackage=nmap
  455. 411 vim distro.yml
  456. 412 ansible-playbook distro.yml -e mypackage=nmap
  457. 413 vim distro.yml
  458. 414 ansible-playbook distro.yml -e mypackage=nmap
  459. 415 vim quicktest.yml
  460. 416 ansible-playbook quicktest.yml
  461. 417 vim quicktest.yml
  462. 418 ansible-playbook quicktest.yml
  463. 419 vim quicktest.yml
  464. 420 ansible-playbook quicktest.yml
  465. 421 vim command-output-test.yml
  466. 422 ansible-playbook command-output-test.yml
  467. 423 vim command-output-test.yml
  468. 424 ansible-playbook command-output-test.yml
  469. 425 ansible all -a "vgs"
  470. 426 vim command-output-test.yml
  471. 427 ansible-playbook command-output-test.yml
  472. 428 vim when_multiple.yml
  473. 429 ansible-playbook when_multiple.yml
  474. 430 vim when_multiple.yml
  475. 431 ansible-playbook when_multiple.yml
  476. 432 vim when_multiple.yml
  477. 433 ansible-playbook when_multiple.yml
  478. 434 vim when_multiple.yml
  479. 435 ansible-playbook when_multiple.yml
  480. 436 vim when_multiple_complex.yml
  481. 437 ansible-playbook when_multiple.yml
  482. 438 vim when_multiple_complex.yml
  483. 439 ls
  484. 440 vim ifsize.yml
  485. 441 ansible-playbook ifsize.yml
  486. 442 vim restart.yml
  487. 443 ansible-playbook restart.yml
  488. 444 ansible ansible1.example.com -a "systemctl stop crond"
  489. 445 ansible-playbook restart.yml
  490. 446 vim restart.yml
  491. 447 ansible-playbook restart.yml
  492. 448 vim ss.yaml
  493. 449 ansible-playbook ss.yaml
  494. 450 cat inventory
  495. 451 vim ss.yaml
  496. 452 ansible-playbook ss.yaml
  497. 453 vim ss.yaml
  498. 454 ansible-playbook ss.yaml
  499. 455 vim ss.yaml
  500. 456 ansible-playbook ss.yaml
  501. 457 vim ss.yaml
  502. 458 ansible-playbook ss.yaml
  503. 459 ansible ansible1.example.com -m package -a "name=vsftpd state=absent"
  504. 460 ansible-playbook ss.yaml
  505. 461 vim ss.yaml
  506. 462 ../countdown 12
  507. 463 vim handlers.yml
  508. 464 touch /tmp/index.html
  509. 465 ansible-playbook handlers.yml
  510. 466 vim handlers.yml
  511. 467 ansible-playbook handlers.yml
  512. 468 ansible all -m file -a "name=/var/www/html/index.html state=absent"
  513. 469 ansible-playbook handlers.yml
  514. 470 vim blocks.yml
  515. 471 ansible-playbook blocks.yml
  516. 472 vim ansible.cfg
  517. 473 ansible all -m setup
  518. 474 ansible-playbook blocks.yml
  519. 475 ls
  520. 476 cd ..
  521. 477 find . -name "blocks2.y*"
  522. 478 cd lesson8/
  523. 479 ls
  524. 480 vim failure.yml
  525. 481 ansible-playbook failure.yml
  526. 482 ls
  527. 483 cd ..
  528. 484 git pull
  529. 485 cd ..
  530. 486 mv rhce8-live rhce8-live.two
  531. 487 git clone https://github.com/sandervanvugt/rhce8-live
  532. 488 cd rhce8-live/lesson8/
  533. 489 ls
  534. 490 vim listing725.yaml
  535. 491 ansible-playbook listing725.yaml
  536. 492 lsblk
  537. 493 ../countdown 6
  538. 494 vim dg.yaml
  539. 495 ansible-playbook dg.yaml
  540. 496 ansible all -m setup
  541. 497 ansible-playbook dg.yaml
  542. 498 ansible-playbook --help | grep cache
  543. 499 ansible-playbook dg.yaml --flush-cache
  544. 500 sudo systemctl stop redis
  545. 501 sudo systemctl start redis
  546. 502 ansible all -m setup
  547. 503 ansible-playbook dg.yaml --flush-cache
  548. 504 ansible all -a "lsblk"
  549. 505 vim dg.yaml
  550. 506 ansible-playbook dg.yaml
  551. 507 vim dg.yaml
  552. 508 ansible-playbook dg.yaml
  553. 509 vim dg.yaml
  554. 510 vim dgg.yaml
  555. 511 ansible-playbook dgg.yaml
  556. 512 vim dgg.yaml
  557. 513 ansible-playbook dgg.yaml
  558. 514 vim dgg.yaml
  559. 515 cd ../lesson7/facts/
  560. 516 ls
  561. 517 vim checkcache.py
  562. 518 ./checkcache.py
  563. 519 vim checkcache.py
  564. 520 ./checkcache.py
  565. 521 vim checkcache.py
  566. 522 ./checkcache.py
  567. 523 ./checkcache.py | grep sdb
  568. 524 pwd
  569. 525 ../../countdown 12
  570. 526 cd ../../lesson9/
  571. 527 ls
  572. 528 vim file.yml
  573. 529 ansible-doc file
  574. 530 ansible-playbook file.yml
  575. 531 vim copy.yml
  576. 532 ansible-playbook copy.yml
  577. 533 vim copy.yml
  578. 534 ansible-playbook copy.yml
  579. 535 vim copy.yml
  580. 536 ansible-playbook copy.yml
  581. 537 vim copy.yml
  582. 538 ansible-playbook copy.yml
  583. 539 cd /tmp/
  584. 540 ls
  585. 541 cd ansible1.example.com/tmp/
  586. 542 ls
  587. 543 cat hosts
  588. 544 cd -
  589. 545 cd
  590. 546 cd rhce8-live/lesson9/
  591. 547 vim selinux.yml
  592. 548 ansible-playbook selinux.yml
  593. 549 dnf provides */semanage
  594. 550 vim selinux.yml
  595. 551 ansible-playbook selinux.yml
  596. 552 ansible all -a "ls -lZ /tmp/removeme"
  597. 553 ls
  598. 554 vim templates/vsftpd.j2
  599. 555 vim vsftpd-template.yml
  600. 556 ls
  601. 557 vim vsftpd-template.yml
  602. 558 ansible-playbook vsftpd-template.yml
  603. 559 ansible all -m setup
  604. 560 ansible-playbook vsftpd-template.yml
  605. 561 vim templates/vsftpd.j2
  606. 562 vim vsftpd-template.yml
  607. 563 ansible-playbook vsftpd-template.yml
  608. 564 ansible all -a "cat /etc/vsftpd/vsftpd.conf"
  609. 565 cat templates/vsftpd.j2
  610. 566 ../countdown 12
  611. 567 vim templates/hosts.j2
  612. 568 ls
  613. 569 vim hostsfile.yml
  614. 570 ansible-playbook hostsfile.yml
  615. 571 ansible all -a "cat /etc/hosts"
  616. 572 ansible-galaxy install geerlingguy.nginx
  617. 573 cd /home/ansible/.ansible/roles/geerlingguy.nginx
  618. 574 ls
  619. 575 cd templates/
  620. 576 ls
  621. 577 cd ../tasks/
  622. 578 ls
  623. 579 vim main.yml
  624. 580 vim setup-RedHat.yml
  625. 581 cd -
  626. 582 cd ~/rhce8-live/lesson11/
  627. 583 ls
  628. 584 vim nginx-role.yml
  629. 585 ansible-playbook nginx-role.yml
  630. 586 vim nginx-role.yml
  631. 587 ansible-playbook nginx-role.yml
  632. 588 ls
  633. 589 vim apache-vhost-role.yml
  634. 590 ansible-playbook apache-vhost-role.yml
  635. 591 cd roles/
  636. 592 ls
  637. 593 cd mywebhost/
  638. 594 ls
  639. 595 tree
  640. 596 vim tasks/main.yml
  641. 597 cd ../motd/
  642. 598 tree
  643. 599 vaim tasks/main.yml
  644. 600 vim tasks/main.yml
  645. 601 vim templates/motd.j2
  646. 602 ls
  647. 603 vim defaults/main.yml
  648. 604 cd ..
  649. 605 tree
  650. 606 cd ..
  651. 607 vim motd-role.yml
  652. 608 ansible-playbook motd-role.yml
  653. 609 ansible all -a "cat /etc/hosts"
  654. 610 ansible all -a "cat /etc/motd"
  655. 611 cat roles/motd/templates/motd.j2
  656. 612 ansible-playbook motd-role.yml -e system_manager=bob
  657. 613 ansible all -a "cat /etc/motd"
  658. 614 ls
  659. 615 cd roles/
  660. 616 ls
  661. 617 vim requirements.yml
  662. 618 sudo dnf search system-roles
  663. 619 sudo dnf install rhel-system-roles
  664. 620 rpm -qd rhel-system-roles
  665. 621 cd /usr/share/doc/rhel-system-roles/
  666. 622 ls
  667. 623 cd selinux/
  668. 624 ls
  669. 625 pwd
  670. 626 cp example-selinux-playbook.yml ~/rhce8-live/lesson11/
  671. 627 vim example-selinux-playbook.yml
  672. 628 ls -l example-selinux-playbook.yml
  673. 629 sudo chown ansible:ansible example-selinux-playbook.yml
  674. 630 vim example-selinux-playbook.yml
  675. 631 ansible-playbook example-selinux-playbook.yml
  676. 632 vim example-selinux-playbook.yml
  677. 633 pwd
  678. 634 cp example-selinux-playbook.yml ~/rhce8-live/lesson11/
  679. 635 cd ~/rhce8-live/lesson11/
  680. 636 ansible-playbook example-selinux-playbook.yml
  681. 637 ansible all -a "ls -Zd /web"
  682. 638 history
  683.  
Advertisement
Add Comment
Please, Sign In to add comment