Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PLAY RECAP *********************************************************************************************************************************
- ansible3.example.com : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
- localhost : ok=3 changed=0 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0
- [ansible@control lesson16]$ vim software-advanced.yml
- [ansible@control lesson16]$ ansible-playbook --ask-vault-pass software-advanced.yml -e newhost=ansible3.example.com -e newhostip=192.168.29.24 -k
- SSH password:
- Vault password:
- PLAY [add host to inventory] ***************************************************************************************************************
- TASK [Gathering Facts] *********************************************************************************************************************
- ok: [localhost]
- TASK [fail] ********************************************************************************************************************************
- skipping: [localhost]
- TASK [add new host to inventory] ***********************************************************************************************************
- ok: [localhost]
- TASK [add new host to /etc/hosts] **********************************************************************************************************
- ok: [localhost]
- PLAY [configure a new RHEL host] ***********************************************************************************************************
- TASK [configure user ansible] **************************************************************************************************************
- ok: [ansible3.example.com]
- TASK [set a password for this user] ********************************************************************************************************
- changed: [ansible3.example.com]
- TASK [enable sudo without passwords] *******************************************************************************************************
- changed: [ansible3.example.com]
- TASK [create SSH directory in user ansible home] *******************************************************************************************
- changed: [ansible3.example.com]
- TASK [copy SSH public key to remote host] **************************************************************************************************
- changed: [ansible3.example.com]
- PLAY [use subscription manager to register and set up repos] *******************************************************************************
- TASK [Gathering Facts] *********************************************************************************************************************
- ok: [ansible3.example.com]
- TASK [register and subscribe ansible3.example.com] *****************************************************************************************
- fatal: [ansible3.example.com]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'rhsm_user' is undefined\n\nThe error appears to be in '/home/ansible/rhce8-live/lesson16/software-advanced.yml': line 57, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n tasks:\n - name: register and subscribe {{ newhost }}\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"}
- PLAY RECAP *********************************************************************************************************************************
- ansible3.example.com : ok=6 changed=4 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
- localhost : ok=3 changed=0 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0
- [ansible@control lesson16]$ history
- 1 pwd
- 2 ../../countdown 12
- 3 ansible-doc firewalld
- 4 cat vsftpd.yml
- 5 rhce8-live/countdown 6
- 6 cd rhce8-live/lesson5/
- 7 cat user.yml
- 8 sudo vim /etc/hosts
- 9 ping ansible1
- 10 ping ansible2
- 11 cat /etc/hosts
- 12 sudo yum install -y epel-release
- 13 sudo yum install -y ansible
- 14 sudo ls -l /root
- 15 sudo -i
- 16 ssh-keygen
- 17 ssh-copy-id ansible1
- 18 ssh-copy-id ansible2
- 19 history
- 20 ssh ansible1 ls -l /root
- 21 ssh ansible1 sudo ls -l /root
- 22 ssh ansible2 sudo ls -l /root
- 23 ansible --version
- 24 sudo yum install -y git
- 25 git clone https://github.com/sandervanvugt/rhce8-live
- 26 git clone https://github.com/sandervanvugt/rhce8-book
- 27 cd rhce8-live/
- 28 ls
- 29 ./countdown 12
- 30 vim /etc/ansible/hosts
- 31 cd lesson2/
- 32 ls
- 33 vim inventory
- 34 vim ansible.cfg
- 35 ansible -i inventory all --list-hosts
- 36 ansible -i inventory -m ping
- 37 ansible -i inventory all -m ping
- 38 ansible file --list-hosts
- 39 cat inventory
- 40 ansible db --list-hosts
- 41 ../countdown 4
- 42 cd ../..
- 43 history | grep git
- 44 cd rhce8-book/
- 45 ls
- 46 vim /etc/ansible/ansible.cfg
- 47 ansible --version
- 48 cd ../rhce8-live/
- 49 ansible --help
- 50 cd lesson2/
- 51 vim ansible.cfg
- 52 cd
- 53 ansible all -m ping
- 54 ls
- 55 ansible localhost -m ping
- 56 cd rhce8-live/
- 57 ls
- 58 cd lesson2/
- 59 ansible ansible2 -m command -a "useradd lisa"
- 60 ansible ansible1 -m user -a "name=linda"
- 61 history
- 62 ../countdown 12
- 63 ansible-doc -l | wc
- 64 ansible-doc -l
- 65 ansible-doc user
- 66 ansible all -m ping
- 67 ansible all -m yum -a "name=httpd state=latest"
- 68 ansible all -m yum -a "name=httpd state=absent"
- 69 ansible all -m service -a "name=httpd state=started"
- 70 ansible all -m copy -a 'content="hello world" dest=/etc/motd'
- 71 ansible all -m command -a "id lisa"
- 72 ansible all -m command -a "rpm -qa | grep nmap"
- 73 ansible all -m shell -a "rpm -qa | grep nmap"
- 74 ansible all -m raw -a "rpm -qa | grep nmap"
- 75 ansible-doc -s user
- 76 ../countdown 5
- 77 ansible -m package -a "name=nmap" all
- 78 ansible all -m command -a "which nmap"
- 79 cd ../lesson4/
- 80 ls
- 81 vim vsftpd.yml
- 82 ansible-playbook vsftpd.yml
- 83 vim vsftpd.yml
- 84 ansible-playbook vsftpd.yml
- 85 history
- 86 ../countdown 12
- 87 history | grep git
- 88 ansible-playbook vsftpd.yml
- 89 cp vsftpd.yml vsftpd2.yml
- 90 vim vsftpd2.yml
- 91 ansible-doc -m command
- 92 ansible-doc command
- 93 ansible-playbook vsftpd2.yml
- 94 vim vsftpd2.yml
- 95 ansible-playbook vsftpd2.yml
- 96 ansible-playbook -vvvv vsftpd2.yml
- 97 sudo yum provides */ansible-lint
- 98 sudo pip3 install ansible-lint
- 99 ansible-lint vsftpd.yml
- 100 ansible-lint vsftpd2.yml
- 101 ../countdown 3
- 102 vim mo.yaml
- 103 ansible-playbook mo.yaml
- 104 cat mo.yaml
- 105 cd ../lesson5/
- 106 ls
- 107 vim user.yml
- 108 ansible-playbook user.yml
- 109 ansible-playbook user.yml -e user=anna
- 110 vim user.yml
- 111 ansible-playbook user.yml
- 112 ansible-playbook user.yml -e user=bob
- 113 git clone https://github.com/sandervanvugt/ansible-advanced
- 114 ls
- 115 mv ansible-advanced/ ../../
- 116 cd ../../
- 117 ls
- 118 cd ansible-advanced/
- 119 ls
- 120 cd windows/
- 121 vim inventory
- 122 cd -
- 123 cd ../rhce8-live/lesson5/
- 124 ls
- 125 cd webservers/
- 126 ls
- 127 pwd
- 128 cat inventory
- 129 ls
- 130 cat group_vars/lamp
- 131 cd ..
- 132 cd webservers/
- 133 ls
- 134 vim site.yml
- 135 ansible-playbook site.yml
- 136 cd ..
- 137 vim piotr.yaml
- 138 ansible-playbook piotr.yaml
- 139 ansible ansible2.example.com -a "firewall-cmd --list-all"
- 140 ansible ansible2.example.com -a "firewall-cmd --list-all --permanent"
- 141 vim piotr.yaml
- 142 ls
- 143 ls -lrt
- 144 curl ansible2.example.com
- 145 mv whatstate whatstate.yaml
- 146 vim whatstate.yaml
- 147 ansible-playbook whatstate.yaml
- 148 ansible ansible2.example.com -a "firewall-cmd --list-all --permanent"
- 149 ansible ansible2.example.com -a "firewall-cmd --list-all"
- 150 ansible-vault --help
- 151 cd ../lesson7/
- 152 ls
- 153 cd vault/
- 154 ls
- 155 ansible-vault create secret.yml
- 156 vim create-user.yml
- 157 ansible-playbook create-user.yml
- 158 ansible-playbook --ask-vault-pass create-user.yml
- 159 ansible ansible2.example.com -a "tail -1 /etc/shadow"
- 160 echo password > vault-pass
- 161 ansible-playbook --vault-password-file=vault-pass create-user.yml
- 162 history
- 163 history | grep git
- 164 ansible ansible1.example.com -m setup > facts.txt
- 165 less facts.txt
- 166 cd ..
- 167 ls
- 168 cd facts/
- 169 ls
- 170 vim facts.yml
- 171 ansible-playbook facts.yml
- 172 l
- 173 ls
- 174 vim ipfact.yml
- 175 ansible-playbook ipfact.yml
- 176 vim ipfact.yml
- 177 ansible-playbook ipfact.yml
- 178 cat ipfact.yml
- 179 ls
- 180 vim newlocalfacts.yml
- 181 vim localfacts.fact
- 182 vim newlocalfacts.yml
- 183 ansible-playbook newlocalfacts.yml
- 184 ansible ansible1.example.com -m setup -a "filter=ansible_local"
- 185 vim pk.yaml
- 186 ansible-playbook pk.yaml
- 187 vim pk.yaml
- 188 pwd
- 189 cd ../../lesson5
- 190 ls
- 191 vim user.yml
- 192 ansible-playbook user.yml
- 193 vim user.yml
- 194 ansible-playbook user.yml -e user=boris
- 195 ../countdown 12
- 196 ls
- 197 cd ../lesson7/
- 198 ls
- 199 cd arrays/
- 200 ls
- 201 cd vars/
- 202 ls
- 203 cat users-dictionary
- 204 cd ..
- 205 ls
- 206 vim multi-dictionary.yml
- 207 ansible-playbook multi-dictionary.yml
- 208 ls
- 209 vim vars/users-list
- 210 vim multi-list.yml
- 211 vim vars/users-list
- 212 vim multi-list.yml
- 213 ansible-playbook multi-list.yml
- 214 vim vars/users-list
- 215 vim multi-list.yml
- 216 cd ..
- 217 cd ../lesson8/
- 218 ls
- 219 vim loopusers.yml
- 220 ansible-playbook loopusers.yml
- 221 vim loopusers.yml
- 222 vim loopservices.yml
- 223 ansible-playbook loopservices.yml
- 224 ls
- 225 vim loop-over-variable.yml
- 226 cat loopvars.yml
- 227 ansible-playbook loop-over-variable.yml
- 228 vim loop-over-variable.yml
- 229 ls
- 230 vim loopservices.yml
- 231 vim register_loop.yml
- 232 ansible-playbook register_loop.yml
- 233 vim register_command.yml
- 234 ansible register_command.yml
- 235 ansible-playbook register_command.yml
- 236 vim register_command.yml
- 237 ansible-playbook register_command.yml
- 238 ../countdown 12
- 239 vim register_command.yml
- 240 vim distro.yml
- 241 ls
- 242 ansible-playbook distro.yml -e my_package=nmap
- 243 ansible-playbook distro.yml -e mypackage=nmap
- 244 vim distro.yml
- 245 ansible-playbook distro.yml -e mypackage=nmap
- 246 vim distro.yml
- 247 ansible-playbook distro.yml -e mypackage=nmap
- 248 ansible-doc -l | grep fact
- 249 ansible-doc -l | grep _fact
- 250 ansible-doc -l | grep _fact | wc
- 251 vim quicktest.yml
- 252 ansible-playbook quicktest.yml
- 253 vim quicktest.yml
- 254 ansible-playbook quicktest.yml
- 255 vim quicktest.yml
- 256 ansible-playbook quicktest.yml
- 257 vim quicktest.yml
- 258 ansible-playbook quicktest.yml
- 259 vim command-output-test.yml
- 260 vgs centos
- 261 sudo vgs centos
- 262 vgs
- 263 sudo vgs
- 264 vim command-output-test.yml
- 265 ansible-playbook command-output-test.yml
- 266 vim command-output-test.yml
- 267 ansible-playbook command-output-test.yml
- 268 vim command-output-test.yml
- 269 vim when_multiple.yml
- 270 ansible-playbook when_multiple
- 271 ansible-playbook when_multiple.yml
- 272 vim when_multiple_complex.yml
- 273 ansible-playbook when_multiple_complex.yml
- 274 vim when_multiple_complex.yml
- 275 ansible-playbook when_multiple_complex.yml
- 276 vim ifsize.yml
- 277 ansible-playbook ifsize.yml
- 278 vim ifsize.yml
- 279 history
- 280 vim ifsize.yml
- 281 journalctl -f
- 282 sudo vim /etc/systemd/journald.conf
- 283 sudo mkdir /var/log/journal
- 284 sudo ls /var/log/journal/
- 285 vim ts.yaml
- 286 ansible-playbook ts.yaml
- 287 vim ts.yaml
- 288 ansible-playbook ts.yaml
- 289 vim ts.yaml
- 290 cat ts.yaml
- 291 ls
- 292 vim handlers.yml
- 293 ansible-playbook handlers.yml
- 294 touch /tmp/index.html
- 295 ansible-playbook handlers.yml
- 296 vim handlers.yml
- 297 ansible-playbook handlers.yml
- 298 vim handlers.yml
- 299 ansible all -m file -a "name=/var/www/index.html state=absent"
- 300 ansible all -m file -a "name=/var/www/html/index.html state=absent"
- 301 vim handlers.yml
- 302 ansible-playbook handlers.yml
- 303 vim handlers.yml
- 304 vim blocks.yml
- 305 ansible-playbook blocks.yml
- 306 vim blocks.yml
- 307 ansible-playbook blocks.yml
- 308 vim blocks2.yml
- 309 ansible-playbook blocks2.yml
- 310 ls
- 311 vim failure.yml
- 312 ansible-playbook failure.yml
- 313 vim failure.yml
- 314 ansible-playbook failure.yml
- 315 vim failure.yml
- 316 ansible-playbook failure.yml
- 317 ls
- 318 vim failure2.yml
- 319 ansible-playbook failure2.yml
- 320 vim failure2.yml
- 321 ansible-playbook failure2.yml
- 322 vim failure2.yml
- 323 vim failure2.yml failure3.yml
- 324 cp failure2.yml failure3.yml
- 325 vim failure3.yml
- 326 ansible-playbook failure3.yml
- 327 vim failure3.yml
- 328 ansible-playbook failure3.yml
- 329 vim failure3.yml
- 330 ansible-playbook failure3.yml
- 331 vim failure3.yml
- 332 ../countdown 15
- 333 ls
- 334 grep sdb *
- 335 vim jg.yaml
- 336 vim lb.yaml
- 337 ansible-playbook lb.yaml
- 338 vim lb.yaml
- 339 vim changed.yml
- 340 ansible-playbook changed.yml
- 341 vim changed.yml
- 342 ansible-playbook changed.yml
- 343 cd ../lesson9/
- 344 ls
- 345 vim file.yml
- 346 ansible-playbook file.yml
- 347 ansible all -a "ls -l /tmp/removeme"
- 348 vim copy.yml
- 349 ansible-playbook copy.yml
- 350 ls -l /tmp/
- 351 cd /tmp/ansible1.example.com/
- 352 ls
- 353 cd tmp/
- 354 ls
- 355 cat hosts
- 356 cd
- 357 cd rhce8-live/
- 358 cd lesson9/
- 359 vim copy.yml
- 360 ansible-playbook copy.yml
- 361 vim copy.yml
- 362 ansible-playbook copy.yml
- 363 vim selinux.yml
- 364 sudo yum provides */semanage
- 365 vim selinux.yml
- 366 ansible-playbook selinux.yml
- 367 cat selinux.yml
- 368 ../countdown 13
- 369 ls
- 370 ls templates/
- 371 vim templates/vsftpd.j2
- 372 vim vsftpd-template.yml
- 373 ansible-playbook vsftpd-template.yml
- 374 ansible all -a "cat /etc/vsftpd/vsftpd.conf"
- 375 vim hostsfile.yml
- 376 vim templates/hosts.j2
- 377 grep localhost /etc/hosts
- 378 grep localhost /etc/hosts >> templates/hosts.j2
- 379 vim templates/hosts.j2
- 380 vim ansible.cfg
- 381 ansible-playbook hostsfile.yml
- 382 ansible all -a "cat /etc/hosts"
- 383 vim templates/hosts.j2
- 384 cd ../lesson11/
- 385 ls
- 386 ansible-galaxy install geerlingguy.docker
- 387 ansible-galaxy install geerlingguy.nginx
- 388 ls
- 389 vim motd-role.yml
- 390 cd roles/
- 391 ls
- 392 cd motd/
- 393 tree
- 394 cat meta/main.yml
- 395 cat tasks/main.yml
- 396 cat templates/motd.j2
- 397 ls
- 398 cat defaults/main.yml
- 399 pwd
- 400 cd ../..
- 401 vim motd-role.yml
- 402 ansible-playbook motd-role.yml
- 403 ls
- 404 vim nginx-role.yml
- 405 ls roles/
- 406 cd ../..
- 407 cd .ansible/
- 408 ls
- 409 cd roles/
- 410 ls
- 411 cd geerlingguy.
- 412 cd geerlingguy.nginx/
- 413 tree
- 414 vim defaults/main.yml
- 415 vim vars/RedHat.yml
- 416 vim tasks/main.yml
- 417 vim tasks/setup-RedHat.yml
- 418 cd
- 419 cd rhce8-live/lesson11/
- 420 ls
- 421 ansible-playbook nginx-role.yml
- 422 ../countdown 12
- 423 ansible-galaxy list
- 424 ls
- 425 cd roles
- 426 ansible-galaxy init mynewrole
- 427 ls
- 428 cd mynewrole/
- 429 ls
- 430 tree
- 431 sudo yum search roles
- 432 sudo yum install rhel-system-roles
- 433 sudo rpm -ql rhel-system-roles
- 434 cd /usr/share/doc/rhel-system-roles/
- 435 ls
- 436 cd selinux/
- 437 ls
- 438 cp example-selinux-playbook.yml ~/rhce8-live/lesson11/
- 439 cd
- 440 cd rhce8-live/lesson11/
- 441 ls
- 442 vim example-selinux-playbook.yml
- 443 cd /etc/ansible/roles/
- 444 ls
- 445 cd /usr/share/ansible/roles/rhel-system-roles.selinux/
- 446 ls
- 447 tree
- 448 cd tasks
- 449 vim main.yml
- 450 cd
- 451 cd rhce8-live/lesson11/
- 452 ls
- 453 vim example-selinux-playbook.yml
- 454 ansible-playbook example-selinux-playbook.yml
- 455 getsebool -a | grep ftp
- 456 vim example-selinux-playbook.yml
- 457 ansible-playbook example-selinux-playbook.yml
- 458 cd ../lesson16/
- 459 vim setup_sudo.yml
- 460 cat vars/defaults
- 461 cat vars/groups
- 462 vim setup_sudo.yml
- 463 cat sudoers.j2
- 464 ansible localhost -m debug -a "msg={{ 'password' | password_hash('sha512','mypassword') }}"
- 465 vim userpw.yml
- 466 history
- 467 ls
- 468 vim users-advanced.yml
- 469 vim exercise134-vars.yaml
- 470 vim users-advanced.yml
- 471 vim exercise134-tasks.yaml
- 472 ansible localhost -m debug -a "msg={{ 'password' | password_hash('sha512','mypassword') }}"
- 473 vim exercise134-tasks.yaml
- 474 vim lb.yaml
- 475 ansible-playbook lb.yaml
- 476 vim inventory
- 477 ansible-playbook lb.yaml
- 478 ssh sander@ansible1
- 479 ssh ansible@ansible1
- 480 exit
- 481 ansible-vault create my_vault.yml
- 482 history
- 483 vim users-advanced.yml
- 484 ansible-playbook users-advanced.yml
- 485 cd ..
- 486 ls
- 487 cd lesson13/
- 488 ls
- 489 vim pascal.py
- 490 ansible-inventory -i pascal.py --graph
- 491 ../countdown 20
- 492 vim ps.yaml
- 493 ls
- 494 vim includes.yml
- 495 vim install-and-setup.yml
- 496 vim imports.yaml
- 497 cat tasks/service.yaml
- 498 cat tasks/firewall.yaml
- 499 ansible-playbook --help | grep tasks
- 500 ansible-playbook --list-tasks imports.yaml
- 501 vim imports.yaml
- 502 ansible-playbook --list-tasks imports.yaml
- 503 vim tasks/firewall.yaml
- 504 ansible-playbook --list-tasks imports.yaml
- 505 ansible-playbook imports.yaml
- 506 cat inventory
- 507 vim inventory
- 508 ansible-playbook imports.yaml
- 509 cd ../lesson15/
- 510 ls
- 511 vim assertnic.yml
- 512 ip a
- 513 ansible-playbook assertnic.yml
- 514 vim assertnic.yml
- 515 ansible-playbook assertnic.yml
- 516 vim assertnic.yml
- 517 ls
- 518 vim assertsize-wrong.yml
- 519 ansible-playbook assertsize-wrong.yml
- 520 vim assertsize.yml
- 521 ansible-playbook assertsize.yml
- 522 ls
- 523 vim assertstat.yml
- 524 ansible-playbook assertstat.yml
- 525 vim assertstat.yml
- 526 ansible-playbook assertstat.yml
- 527 ../countdown 20
- 528 cd ../lesson16/
- 529 vim jg.yaml
- 530 ansible-playbook jg.yaml
- 531 vim jg.yaml
- 532 ansible-playbook jg.yaml
- 533 ansible ansible2 -a "lvs"
- 534 ls
- 535 vim storage-advanced.yml
- 536 cd ../lesson15/
- 537 vim uri.yml
- 538 ansible-playbook uri.yml
- 539 ../countdown 12
- 540 ansible_facts['lvm']['vgs']['vgfiles']['size_g'] | float > 5
- 541 ansible -m setup ansible1 | less
- 542 ansible -m setup ansible1.example.com | less
- 543 ansible-doc -l | grep nuta
- 544 ansible-doc yum
- 545 ansible-doc -l | grep yum
- 546 cd ../lesson16/
- 547 vim software-advanced.yml
- 548 ansible-playbook software-advanced.yml
- 549 ansible-playbook software-advanced.yml -e newhost=ansible3.example.com -e newhostip=192.168.29.24
- 550 cat /etc/hosts
- 551 vim inventory
- 552 ansible-playbook --ask-vault-pass software-advanced.yml -e newhost=ansible3.example.com -e newhostip=192.168.29.24
- 553 vim inventory
- 554 ansible-playbook --ask-vault-pass software-advanced.yml -e newhost=ansible3.example.com -e newhostip=192.168.29.24
- 555 vim inventory
- 556 vim software-advanced.yml
- 557 sudo vim /etc/hosts
- 558 ansible-playbook --ask-vault-pass software-advanced.yml -e newhost=ansible3.example.com -e newhostip=192.168.29.24
- 559 vim software-advanced.yml
- 560 ansible-playbook --ask-vault-pass software-advanced.yml -e newhost=ansible3.example.com -e newhostip=192.168.29.24
- 561 vim software-advanced.yml
- 562 ansible-playbook --ask-vault-pass software-advanced.yml -e newhost=ansible3.example.com -e newhostip=192.168.29.24 -k
- 563 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement