Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ansible@control lesson16]$ history
- 1 ip a
- 2 sudo vim /etc/hosts
- 3 ping ansible1
- 4 sudo vim /etc/hosts
- 5 ping ansible1
- 6 ping ansible2
- 7 ping ansible3
- 8 sudo yum install -y epel-release
- 9 sudo yum install ansible
- 10 sudo yum update -y
- 11 sudo yum install ansible
- 12 sudo reboot
- 13 sudo yum install ansible
- 14 sudo yum provides */sshpass
- 15 sudo yum install ansible --nobest
- 16 sudo yum install ansible --skip-broken
- 17 sudo -i
- 18 sudo yum install ansible
- 19 sudo vim /etc/yum.repos.d/oldepel.repo
- 20 sudo cat /etc/yum.repos.d/oldepel.repo
- 21 ansible --version
- 22 ping ansible1
- 23 mkdir setup
- 24 cd setup
- 25 vim inventory
- 26 ansible -i inventory all -m ping
- 27 ssh root@ansible1
- 28 ssh root@ansible2
- 29 ssh root@ansible3
- 30 ansible -i inventory all -m ping
- 31 ansible -i inventory all -m ping -u root -k
- 32 history
- 33 ansible -i inventory all -u root -k -m command -a "useradd ansible"
- 34 sudo useradd ansible
- 35 echo $?
- 36 ansible -i inventory all -u root -k -m user -a "name=ansible"
- 37 ansible -i inventory all -u root -k -m user -a "name=bob"
- 38 history
- 39 ansible -i inventory all -u root -k -m shell -a "echo password | passwd --stdin ansible"
- 40 ssh ansible@ansible1
- 41 history
- 42 ansible -i inventory all -u ansible -k -m command -a "whoami"
- 43 ansible -i inventory all -u ansible -k -m command -a "ls -l /root"
- 44 ansible -i inventory all -u root -k -m shell -a '"ansible ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ansible'
- 45 ansible -i inventory all -u root -k -m shell -a 'echo "ansible ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ansible'
- 46 ssh ansible1
- 47 ansible -i inventory all -u ansible -k -m command -a "ls -l /root"
- 48 ansible -i inventory all -u ansible -k -b -m command -a "ls -l /root"
- 49 ssh-keygen
- 50 ssh-copy-id ansible1
- 51 ssh-copy-id ansible2
- 52 ssh-copy-id ansible3
- 53 ssh ansible3
- 54 ansible -i inventory all -u ansible -b -m command -a "ls -l /root"
- 55 history
- 56 pwd
- 57 vim inventory
- 58 sudo vim /etc/ansible/hosts
- 59 ansible --version
- 60 ansible -i inventory all --list-hosts
- 61 ansible db --list-hosts
- 62 ansible -i inventory db --list-hosts
- 63 history
- 64 sudo vim /etc/ansible/ansible.cfg
- 65 ansible --version
- 66 vim ansible.cfg
- 67 ansible --version
- 68 cd ..
- 69 sudo yum install git
- 70 git clone https://github.com/sandervanvugt/rhce8-live
- 71 ls
- 72 cd rhce8-live/
- 73 ls
- 74 cd lesson2/
- 75 ls
- 76 vim ansible.cfg
- 77 vim inventory
- 78 ansible all -m command -a "ls -l /root"
- 79 history
- 80 ansible-doc -l |wc
- 81 ansible-doc -l
- 82 ansible-doc user
- 83 ansible all -m service -a "name=httpd state=started"
- 84 ansible all -m service -a "name=crond state=started"
- 85 ansible all -m service -a "name=crond state=stopped"
- 86 ansible all -m command -a "/sbin/reboot -t now"
- 87 ansible all -m command -a "/sbin/reboot"
- 88 ansible all -m service -a "name=crond state=started"
- 89 cd
- 90 ansible all -m ping
- 91 ls
- 92 ansible all -m ping -i setup/inventory
- 93 cd rhce8-live/
- 94 ls
- 95 ./countdown 14
- 96 cd lesson2/
- 97 ansible all -m package -a "name=nmap"
- 98 ansible-doc yum
- 99 ansible all -m service -a "name=httpd state=started"
- 100 yum demostructure.yaml
- 101 vim demostructure.yaml
- 102 ansible-playbook demostructure.yaml
- 103 vim demostructure.yaml
- 104 ansible-playbook demostructure.yaml
- 105 cat demostructure.yaml
- 106 vim demostructure.yaml
- 107 ansible-playbook demostructure.yaml
- 108 vim demostructure.yaml
- 109 ansible-playbook demostructure.yaml
- 110 vim demostructure.yaml
- 111 ansible-playbook demostructure.yaml
- 112 vim demostructure.yaml
- 113 vim ~/.vimrc
- 114 ls
- 115 cd ../lesson5
- 116 ls
- 117 grep vsftp *
- 118 cd ..
- 119 ls
- 120 cd lesson4
- 121 ls
- 122 vim vsftpd.yml
- 123 ansible-playbook vsftpd.yml
- 124 history
- 125 ansible-playbook vsftpd.yml
- 126 sudo vim /etc/hosts
- 127 ansible-doc copy
- 128 ansible all -m copy -a "src=/etc/hosts dest=/etc/hosts"
- 129 ansible-playbook vsftpd.yml
- 130 history
- 131 vim ansible.cfg
- 132 ansible-playbook vsftpd-err.yml
- 133 vim vsftpd-err.yml
- 134 ansible-playbook vsftpd-err.yml
- 135 ansible-playbook --syntax-check vsftpd-err.yml
- 136 ansible-playbook -v vsftpd.yml
- 137 ansible-playbook -vvvv vsftpd.yml
- 138 sudo yum provides */ansible-lint
- 139 sudo yum install -y python3-ansible-lint
- 140 ansible-lint -L
- 141 ansible-lint vsftpd.yml
- 142 ansible all -m setup | less
- 143 cd ../lesson5/
- 144 vim inventory
- 145 ls
- 146 cd ../lesson4/
- 147 ls
- 148 cd ..
- 149 cd lesson7/
- 150 ls
- 151 cd
- 152 find -name "variables_example.*"
- 153 cd rhce8-live/
- 154 cd lesson5/
- 155 ls
- 156 vim variables_example.yaml
- 157 ansible-playbook variables_example.yaml
- 158 vim variables_example.yaml
- 159 ansible-playbook variables_example.yaml
- 160 vim variables_example.yaml
- 161 ansible-playbook variables_example.yaml -e myuser=bob
- 162 cat variables_example.yaml
- 163 find ~ -name "variables_example.*"
- 164 ls
- 165 cd ../..
- 166 git clone https://github.com/sandervanvugt/rhce8
- 167 git clone https://github.com/sandervanvugt/rhce8-book
- 168 find ~ -name "variables_example.*"
- 169 vim askme.yaml
- 170 cd rhce8-book/
- 171 grep vars_prompt
- 172 grep vars_prompt *
- 173 vim listing710.yaml
- 174 cd -
- 175 vim askme.yaml
- 176 vim rhce8-book/listing710.yaml
- 177 vim askme.yaml
- 178 ansible-playbook askme.yaml
- 179 mv askme.yaml rhce8-live/lesson5/
- 180 cd rhce8-live/lesson5/
- 181 ls
- 182 ansible-playbook askme.yaml
- 183 vim inventory
- 184 vim askme.yaml
- 185 ansible-playbook askme.yaml
- 186 cat askme.yaml
- 187 ls
- 188 cd webservers/
- 189 ls
- 190 pwd
- 191 ls
- 192 cat inventory
- 193 tree
- 194 vim group_vars/lamp
- 195 vim site.yml
- 196 ansible-playbook site.yml
- 197 history
- 198 cd ..
- 199 vim create_user.yaml
- 200 ansible-playbook create_user.yaml
- 201 vim create_user.yaml
- 202 ansible-playbook create_user.yaml
- 203 vim create_user.yaml
- 204 ansible-playbook create_user.yaml
- 205 ansible-doc -l | grep group
- 206 ansible-doc group
- 207 vim create_user.yaml
- 208 ansible-playbook create_user.yaml
- 209 cat create_user.yaml
- 210 ../countdown 12
- 211 vim ct.yaml
- 212 ansible -u root - inventory remotehost -k -m raw -a "yum install -y python3"
- 213 ansible -u root -i inventory remotehost -k -m raw -a "yum install -y python3"
- 214 ansible-vault --help
- 215 cd ../lesson7/
- 216 ls
- 217 cd vault/
- 218 ls
- 219 ansible-vault create secret.yml
- 220 cat secret.yml
- 221 vim create-user.yml
- 222 ansible-playbook create-user.yml
- 223 ansible-playbook --ask-vault-pass create-user.yml
- 224 ansible ansible1.example.com -a "tail /etc/shadow"
- 225 echo password > ~/vault-pass
- 226 ansible-playbook --vault-password-file=~/vault-pass create-user.yml
- 227 history
- 228 vim secret.dummy
- 229 cat secret.dummy
- 230 cat create-user.yml
- 231 ansible ansible1.example.com -m setup | less
- 232 history | grep copy
- 233 cd ..
- 234 pwd
- 235 cd facts/
- 236 ls
- 237 vim facts.yml
- 238 ansible-playbook facts.yml
- 239 vim ansible.cfg
- 240 ansible-playbook facts.yml
- 241 vim inventory
- 242 ansible-playbook facts.yml
- 243 vim ipfact.yml
- 244 ansible-playbook ipfact.yml
- 245 vim ipfact.yml
- 246 pwd
- 247 ../../countdown 13
- 248 vim ipfact.yml
- 249 ls
- 250 vim newlocalfacts.yml
- 251 vim localfacts.fact
- 252 ansible-playbook newlocalfacts.yml
- 253 vim inventory
- 254 ansible-playbook newlocalfacts.yml
- 255 ansible ansible2 -m setup -a "filter=ansible_local"
- 256 vim printfacts.yaml
- 257 ansible-playbook printfacts.yaml
- 258 vim printfacts.yaml
- 259 ansible-playbook printfacts.yaml
- 260 vim printfacts.yaml
- 261 ansible-playbook printfacts.yaml
- 262 vim printfacts.yaml
- 263 ansible-playbook printfacts.yaml
- 264 vim printfacts.yaml
- 265 cat printfacts.yaml
- 266 ls
- 267 vim setupfactcache.yaml
- 268 ansible -m setup ansible2
- 269 ansible -m setup ansible2 | less
- 270 cd ..
- 271 ls
- 272 cd arrays/
- 273 ls
- 274 vim inventory
- 275 tree
- 276 cat vars/users-dictionary
- 277 cat vars/users-list
- 278 ls
- 279 vim multi-list.yml
- 280 ansible-playbook multi-list.yml
- 281 ansible-playbook multi-dictionary.yml
- 282 vim multi-dictionary.yml
- 283 ls
- 284 pwd
- 285 ../../countdown 13
- 286 cd ..
- 287 ls
- 288 cd lesson8/
- 289 ls
- 290 vim loopservices.yml
- 291 ansible-playbook loopservices.yml
- 292 vim loopservices.yml
- 293 ansible-playbook loopservices.yml
- 294 vim loopusers.yml
- 295 ansible-playbook loopusers.yml
- 296 vim loop-over-variable.yml
- 297 cat loopvars.yml
- 298 vim loop-over-variable.yml
- 299 ansible-playbook loop-over-variable.yml
- 300 ls
- 301 vim register_loop.yml
- 302 ansible-playbook register_loop.yml
- 303 im register_command.yml
- 304 vim register_command.yml
- 305 vim register_loop.yml
- 306 ansible-playbook register_loop.yml
- 307 vim register_loop.yml
- 308 ansible-playbook register_loop.yml
- 309 vim register_loop.yml
- 310 ansible-playbook register_loop.yml
- 311 vim register_loop.yml
- 312 ansible-playbook register_loop.yml
- 313 vim register_command.yml
- 314 ansible-playbook register_command.yml
- 315 vim register_command.yml
- 316 ansible-playbook register_command.yml
- 317 vim register_command.yml
- 318 vim distro.yml
- 319 ansible-playbook distro.yml
- 320 vim distro.yml
- 321 ansible-playbook distro.yml
- 322 vim distro.yml
- 323 vim distro.yml -e mypackage=vsftpd
- 324 ansible-playbook distro.yml -e mypackage=vsftpd
- 325 vim quicktest.yml
- 326 ansible-playbook quicktest.yml
- 327 vim quicktest.yml
- 328 ansible-playbook quicktest.yml
- 329 vim command-output-test.yml
- 330 vgs
- 331 sudo vgs
- 332 ansible-playbook command-output-test.yml
- 333 vim command-output-test.yml
- 334 history
- 335 sudo cat /etc/yum.repos.d/oldepel.repo
- 336 echo >> testfile <<EOF
- file1
- file2
- EOF
- 337 cat testfile
- 338 vim test.sh
- 339 bash test.sh
- 340 cat testfile
- 341 bash test.sh
- 342 vim test.sh
- 343 bash test.sh
- 344 cat testfile
- 345 vim test.sh
- 346 history | less
- 347 cd
- 348 find . -name "set-fact*"
- 349 ls
- 350 history
- 351 cd rhce8-live/
- 352 ls
- 353 cd lesson8/
- 354 ls
- 355 vim when_multiple.yml
- 356 ansible-playbook when_multiple.yml
- 357 vim when_multiple.yml
- 358 ansible-playbook when_multiple.yml
- 359 vim when_multiple_complex.yml
- 360 ansible-playbook when_multiple_complex.yml
- 361 vim ifsize.yml
- 362 ansible ansible1.example.com -m setup | less
- 363 vim ifsize.yml
- 364 ansible-playbook ifsize.yml
- 365 vim ifsize.yml
- 366 ansible-playbook ifsize.yml -e package=vsftpd
- 367 cat ifsize.yml
- 368 vim restart.yml
- 369 ansible ansible1.example.com -m service -a "name=crond state=stopped"
- 370 ansible-playbook restart.yml
- 371 vim et.yaml
- 372 vim ansible1.fact
- 373 vim ansible2.fact
- 374 vim et.yaml
- 375 ansible-playbook et.yaml
- 376 vim et.yaml
- 377 vim ansible1.fact
- 378 ansible-playbook et.yaml
- 379 vim ansible1.fact
- 380 vim et.yaml
- 381 ansible-playbook et.yaml
- 382 vim inventory
- 383 ansible-playbook et.yaml
- 384 vim et.yaml
- 385 vim localfact.fact
- 386 vim et.yaml
- 387 ansible-playbook et.yaml
- 388 vim et.yaml
- 389 ansible-playbook et.yaml
- 390 vim et.yaml
- 391 cat et.yaml
- 392 vim handlers.yml
- 393 cp /tmp/index.html
- 394 touch /tmp/index.html
- 395 ansible-playbook handlers.yml
- 396 vim handlers.yml
- 397 ansible-playbook handlers.yml
- 398 ansible all -m file -a "name=/var/www/html/index.html state=absent"
- 399 vim handlers.yml
- 400 ansible-playbook handlers.yml
- 401 ls
- 402 vim blocks.yml
- 403 ansible-playbook blocks.yml
- 404 vim blocks.yml
- 405 ansible-playbook blocks.yml
- 406 grep rescue *
- 407 cd ..
- 408 git pull
- 409 cd ..
- 410 mkdir new
- 411 cd new
- 412 git clone https://github.com/sandervanvugt/rhce8-live
- 413 cd rhce8-live/
- 414 cd lesson8/
- 415 ls
- 416 vim block2.yaml
- 417 ansible-playbook block2.yaml
- 418 vim block2.yaml
- 419 vim ar.yaml
- 420 vim ../countdown
- 421 ../countdown 10
- 422 ls
- 423 vim failure.yml
- 424 ansible-playbook failure.yml
- 425 history | less
- 426 ansible -i inventory localhost -u root -k -m shell -a 'echo "ansible ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ansible'
- 427 sudo vim /etc/sudoers.d/ansible
- 428 ansible-playbook failure.yml
- 429 vim failure.yml
- 430 ansible-playbook failure.yml
- 431 vim failure.yml
- 432 vim listing725.yaml
- 433 ansible-playbook listing725.yaml
- 434 vim changed.yml
- 435 ansible-playbook changed.yml
- 436 vim changed.yml
- 437 ansible-playbook changed.yml
- 438 cd ../lesson9/
- 439 vim file.yml
- 440 ansible-playbook file.yml
- 441 vim file.yml
- 442 ansible all -a "ls -l /tmp/removeme"
- 443 vim file.yml
- 444 ansible all -m file "name=/tmp/removeme state=absent"
- 445 ansible all -m file - a "name=/tmp/removeme state=absent"
- 446 ansible all -m file - a "path=/tmp/removeme state=absent"
- 447 ansible all -m file -a "path=/tmp/removeme state=absent"
- 448 ansible-playbook file.yml
- 449 vim copy.yml
- 450 ansible-playbook copy.yml
- 451 ls /tmp
- 452 cat /tmp/ansible1.example.com/tmp/hosts
- 453 vim ../countdown
- 454 ../countdown 15
- 455 cd ../lesson8/
- 456 ls
- 457 cd ..
- 458 ls
- 459 cd ..
- 460 ls
- 461 cd rhce8-book/
- 462 ls
- 463 vim listing79.yaml
- 464 ansible-playbook listing79.yaml
- 465 vim listing79.yaml
- 466 ansible-playbook listing79.yaml
- 467 vim inventory
- 468 ansible-playbook listing79.yaml
- 469 ansible-doc set_fact
- 470 cat listing79.yaml
- 471 cd ../rhce8-live/lesson9/
- 472 l
- 473 ls
- 474 vim selinux.yml
- 475 ansible-playbook selinux.yml
- 476 vim selinux.yml
- 477 ansible all -a "ls -lZ /tmp/removeme"
- 478 ls
- 479 vim templates/vsftpd.j2
- 480 vim vsftpd-template.yml
- 481 ansible-playbook vsftpd-template.yml
- 482 ansible ansible1.example.com -a "cat /etc/vsftpd/vsftpd.conf"
- 483 ls templates/
- 484 vim templates/hosts.j2
- 485 vim hostsfile.yml
- 486 ansible-playbook hostsfile.yml
- 487 ansible all -a "cat /etc/hosts"
- 488 ../countdown 13
- 489 cd ../lesson11/
- 490 ls
- 491 ansible-galaxy install geerlingguy.nginx
- 492 cd roles/
- 493 ls
- 494 cd ..
- 495 ansible-galaxy install nginxinc.nginx
- 496 ansible-galaxy install https://galaxy.ansible.com/nginxinc/nginx
- 497 sudo yum install rhel-system-roles
- 498 rpm -ql rhel-system-roles
- 499 cd /usr/share/doc/rhel-system-roles/
- 500 ls
- 501 cd timesync/
- 502 ls
- 503 vim example-multiple-ntp-servers-playbook.yml
- 504 cd /usr/share/ansible/roles/
- 505 ls
- 506 cd rhel-system-roles.timesync/
- 507 ls -l
- 508 cd tasks/
- 509 ls
- 510 vim main.yml
- 511 cd
- 512 cd rhce8-live/
- 513 cd lesson11/
- 514 ls
- 515 cd roles
- 516 ls
- 517 ansible-galaxy init myrole
- 518 ls
- 519 tree myrole/
- 520 cd motd/
- 521 ls
- 522 tree
- 523 cat defaults/main.yml
- 524 cat tasks/main.yml
- 525 cat templates/motd.j2
- 526 cd ..
- 527 ls
- 528 vim motd-role.yml
- 529 ansible-playbook motd-role.yml
- 530 ansible-galaxy list
- 531 ls
- 532 vim enforce-selinux.yml
- 533 vim enforce-selinux-simplified.yml
- 534 ls
- 535 ansible-galaxy role install nginxinc.nginx
- 536 ansible-galaxy collection install nginxinc.nginx_controller
- 537 vim ansible.cfg
- 538 ansible-galaxy role install nginxinc.nginx
- 539 vim ansible.cfg
- 540 ansible-galaxy collection install ansible.posix
- 541 tree ~/.ansible/collections/ansible_collections/ansible/posix/
- 542 tree ~/.ansible/collections/ansible_collections/ansible/posix/ | less
- 543 ansible-doc ansible.posix.selinux
- 544 ls
- 545 vim enforce-selinux-simplified.yml
- 546 cd /usr/share/doc/rhel-system-roles/
- 547 ls
- 548 cd selinux/
- 549 ls
- 550 cp example-selinux-playbook.yml ~/rhce8-live/lesson12
- 551 cd ~/rhce8-live/lesson12/
- 552 ls
- 553 vim example-selinux-playbook.yml
- 554 ansible-playbook example-selinux-playbook.yml
- 555 ansible all -m stat "name=/www"
- 556 ansible all -m stat -a "name=/www"
- 557 ansible all -m stat -a "path=/www"
- 558 ansible all -a "ls -Zd /www"
- 559 vim inventory
- 560 ansible all -a "ls -Zd /www"
- 561 ansible all -i localhost, -m debug -a "msg={{ 'mypassword' | password_hash('sha512', 'mysecretsalt') }}"
- 562 cd ../lesson16/
- 563 ls
- 564 vim userpw.yml
- 565 ansible-playbook userpw.yml
- 566 ssh anna@ansible2.example.com
- 567 ansible ansible2.example.com -a "cat /etc/shadow"
- 568 ls
- 569 vim listing1313.yaml
- 570 sudo useradd linda
- 571 sudo -i
- 572 vim listing1313.yaml
- 573 vim users-advanced.yml
- 574 vim exercise134-tasks.yaml
- 575 vim exercise134-vars.yaml
- 576 ls
- 577 vim users-advanced.yml
- 578 ansible-doc authorized_key
- 579 vim users-advanced.yml
- 580 ansible-playbook users-advanced.yml
- 581 vim users-advanced.yml
- 582 ../countdown 12
- 583 vim ct.yaml
- 584 cat ct.yaml
- 585 ../countdown 15
- 586 cat ct.yaml
- 587 vim ct.yaml
- 588 ansible-playbook ct.yaml
- 589 vim ct.yaml
- 590 ansible-playbook ct.yaml
- 591 vim inventory
- 592 vim ct.yaml
- 593 ansible-playbook ct.yaml
- 594 ansible all -a "lsblk"
- 595 vim ct.yaml
- 596 cd ../lesson13/
- 597 vim includes-and-imports.yaml
- 598 vim tasks/service.yaml
- 599 vim tasks/firewall.yaml
- 600 ls
- 601 cd ../lesson15/
- 602 ls
- 603 vim assertsize-wrong.yml
- 604 ansible-playbook assertsize-wrong.yml
- 605 vim assertsize-wrong.yml
- 606 vim assertsize.yml
- 607 ansible-playbook assertsize.yml
- 608 vim uri.yml
- 609 ansible-playbook uri.yml
- 610 cd ../lesson16/
- 611 vim ct.yaml
- 612 ansible-playbook ct.yaml
- 613 vim ct.yaml
- 614 ansible-playbook ct.yaml
- 615 vim ct.yaml
- 616 vim cp.yaml
- 617 ansible-playbook cp.yaml
- 618 vim cp.yaml
- 619 ansible-playbook cp.yaml
- 620 vim cp.yaml
- 621 ansible-doc parted
- 622 vim cp.yaml
- 623 ansible-doc parted
- 624 ansible-playbook cp.yaml
- 625 vim cp.yaml
- 626 ls
- 627 vim storage-advanced.yml
- 628 ansible-playbook storage-advanced.yml
- 629 ansible ansible1.example.com -a "lsblk"
- 630 history
- [ansible@control lesson16]$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement