Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ####ON KVM HOST
- 88 cat ansible.cfg
- 89 vim create-vms.yaml
- 90 vim host_vars/localhost
- 91 vim templates/vm-template.xml.j2
- 92 vim create-vms.yaml
- 93 sudo virsh list
- 94 ansible-playbook create-vms.yaml
- 95 sudo virsh list
- 96 sudo virsh list all
- 97 sudo virsh list --all
- 98 ls
- 99 sudo yum repolist
- 100 sudo yum install epel-release
- 101 sudo yum search epel
- 102 sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
- 103 sudo yum install python3-paramiko
- 104 ansible-doc -l | grep ios
- 105 ansible-doc ios_interfaces
- 106 ansible-doc -l | grep ^ios | less
- 107 exit
- 108 cd cisco/
- 109 ls
- 110 ansible --version
- 111 vim inventory
- 112 ls
- 113 ansible -m debug -a "var=ansible_user" switches
- 114 vim inventory
- 115 vim ansible.cfg
- 116 ansible -m debug -a "var=ansible_user" switches
- 117 mkdir group_vars
- 118 vim group_vars/switches
- 119 ansible -m debug -a "var=ansible_user" switches
- 120 ls
- 121 ansible all -m ios_ping -a "dest=192.168.50.1"
- 122 pip3 install paramiko
- 123 sudo pip3 install paramiko
- 124 sudo dnf upgrade -y
- 125 ansible all -m ios_ping -a "dest=192.168.50.1"
- 126 ssh admin@192.168.50.136
- 127 ssh admin@192.168.50.69
- 128 ansible all -m ios_ping -a "dest=192.168.50.1"
- 129 ansible -m ios_command -a "commands='traceroute 8.8.8.8 probe 2 timeout 2'" all
- 130 ansible all -m ios_facts
- 131 ansible all -m ios_interfaces -a "state"
- 132 ansible all -m ios_interfaces
- 133 vim iosbackup.yml
- 134 ansible-playbook iosbackup.yml
- 135 cat iosbackup.yml
- 136 vim inventory
- 137 cd group_vars/
- 138 cat switches
- 139 history | grep pip
- 140 exit
- 141 history | grep pip
- 142 cd cisco/
- 143 cat ansible.cfg
- 144 sudo vim /etc/ansible/hosts
- 145 su - student
- 146 su - sander
- 147 free -m
- 148 cd provision-kvm/
- 149 ls
- 150 vim ansible.cfg
- 151 cat host_vars/localhost
- 152 vim host_vars/localhost
- 153 ls templates/
- 154 cat vm-t
- 155 cat vm-template.xml.j2
- 156 cat templates/vm-template.xml.j2
- 157 s
- 158 ls
- 159 vim create-vms.yaml
- 160 ansible-playbook create-vms.yaml
- 161 ls
- 162 cd cisco/
- 163 ls
- 164 cd cisco/
- 165 ls
- 166 vim inventory
- 167 ansible switches -m ping -u admin -k -i inventory
- 168 sudo dnf install python-paramiko
- 169 sudo subscription-manager status
- 170 yum repolist
- 171 sudo yum repolist
- 172 sudo yum install python-paramiko
- 173 ansible all -i switches -c network_cli -u admin -k -m ios_facts -e ansible_network_os=ios
- 174 ansible all -i inventory -c network_cli -u admin -k -m ios_facts -e ansible_network_os=ios
- 175 vim ansible.cfg
- 176 vim inventory
- 177 ansible all -i inventory -m ios_facts -e ansible_network_os=ios
- 178 find / -name "paramiko*"
- 179 sudo find / -name "paramiko*" 2>/dev/null
- 180 cd /usr/lib/python3.6/site-packages/ansible/plugins/connection/
- 181 vim paramiko_ssh.py
- 182 ssh ansible@192.168.29.4
- 183 exit
- 184 ls
- 185 cd cisco/
- 186 ls
- 187 vim inventory
- 188 cd group_vars/
- 189 ls
- 190 vim switches
- 191 cd ..
- 192 vim ansible.cfg
- 193 ansible-doc -l | grep ios | less
- 194 ansible-doc -l | grep ^ios | less
- 195 pwd
- 196 ssh admin@192.168.50.69
- 197 ansible 192.168.50.69 -m ping -u admin -k -i inventory
- 198 sudo pip3 install paramiko
- 199 ls
- 200 vim iosbackup.yml
- 201 vim inventory
- 202 vim iosbackup.yml
- 203 ansible-doc ios-config
- 204 vim iosbackup.yml
- 205 ansible-doc ios_config
- 206 ls
- 207 ls -l backup/
- 208 ls
- 209 ansible-playbook iosbackup.yml
- 210 history | grep backup
- 211 ssh admin@192.168.50.69
- 212 ansible-playbook iosbackup.yml -u admin -k
- 213 ls backup/
- 214 cd ..
- 215 ls
- 216 cd provision-kvm
- 217 ls
- 218 cat ansible.cfg
- 219 cat host_vars/
- 220 cat host_vars/localhost
- 221 vim host_vars/localhost
- 222 sudo df -h
- 223 free -m
- 224 ls
- 225 cd templates/
- 226 ls -l
- 227 vim vm-template.xml.j2
- 228 cd ..
- 229 vim create-vms.yaml
- 230 cat host_vars/localhost
- 231 vim create-vms.yaml
- 232 ansible-playbook create-vms.yaml
- 233 history
- #####On Rocky[ansible@controller docker]$ history
- 1 ip a
- 2 sudo vim /etc/hosts
- 3 cat /etc/hosts
- 4 sudo vim /etc/hosts
- 5 sudo dnf install epel-release
- 6 sudo dnf install -y ansible
- 7 ansible --version
- 8 vim /etc/hosts
- 9 mkdir projectone
- 10 cd projectone/
- 11 vim inventory
- 12 ansible -i inventory -m command -a "ip a"
- 13 ansible all -i inventory -m command -a "ip a"
- 14 cat /etc/hosts
- 15 sudo sh -c "echo password | passwd --stdin ansible"
- 16 echo ansible ALL=(ALL) NOPASSWD: ALL > /tmp/sudoers
- 17 echo 'ansible ALL=(ALL) NOPASSWD: ALL' > /tmp/sudoers
- 18 ansible all -i inventory -u root -k -m raw -a "useradd -G wheel ansible"
- 19 sudo vim /etc/ansible/ansible.cfg
- 20 ansible all -i inventory -u root -k -m raw -a "useradd -G wheel ansible"
- 21 ansible all -i inventory -u root -k -m raw -a "useradd -G wheel bob"
- 22 ansible all -i inventory -u root -k -m raw -a "userdel bob"
- 23 sudo cp /tmp/sudoers /etc/sudoers.d/ansible
- 24 sudo ls /root
- 25 su - ansible
- 26 ssh-keygen
- 27 ssh-copy-id ubuntu
- 28 ssh-copy-id centos7
- 29 ssh-copy-id rhel84
- 30 ansible all -i inventory -u root -k -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
- 31 ls
- 32 cd projectone/
- 33 ansible all -i inventory -u root -k -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
- 34 ansible all -i inventory -u ansible -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
- 35 cd ..
- 36 sudo dnf install git -y
- 37 git clone https://github.com/sandervanvugt/ansiblein3weeks
- 38 git clone https://github.com/sandervanvugt/ansible3weeks
- 39 git clone https://github.com/sandervanvugt/ansibleinthreeweeks
- 40 cd ansibleinthreeweeks/
- 41 ls
- 42 cd ..
- 43 git clone https://github.com/sandervanvugt/luth
- 44 luth/countdown 15
- 45 ansible ubuntu -i inventory -u ansible -k -K -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
- 46 cd projectone/
- 47 ansible ubuntu -i inventory -u ansible -k -K -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
- 48 ansible ubuntu -i inventory -u ansible -k -K -m command -a "ls -ld /etc/sudoers.d"
- 49 ansible ubuntu -i inventory -u ansible -k -K -m command -a "ls -la /root"
- 50 vim inventory
- 51 cat /etc/ansible/hosts
- 52 less /etc/ansible/ansible.cfg
- 53 cd ../ansibleinthreeweeks/
- 54 ls
- 55 cd basics/
- 56 ls
- 57 cd ..
- 58 find . -name "ansible.cfg"
- 59 vim ansible.cfg
- 60 cp ansible.cfg ../projectone/
- 61 cd ../projectone/
- 62 ls
- 63 vim inventory
- 64 cd -
- 65 cd collections/
- 66 ls
- 67 vim ansible.cfg
- 68 ansible-doc -l
- 69 ansible-doc -l | wc
- 70 cd ../../projectone/
- 71 history
- 72 ansible ubuntu -i inventory -u ansible -b -k -K -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
- 73 cat ansible.cfg
- 74 ansible -m package -a "name=nmap"
- 75 ansible ubuntu -m package -a "name=nmap"
- 76 ansible-doc package
- 77 ansible all -m command -a "useradd -m -s /bin/bash linda"
- 78 vim inventory
- 79 ansible all -m command -a "id linda"
- 80 ansible all -m command -a "useradd -m -s /bin/bash linda"
- 81 ansible all -m user -a "name=linda"
- 82 ../luth/countdown 12
- 83 sudo vim /etc/hosts
- 84 cd ../ansibleinthreeweeks/
- 85 ls
- 86 cd collections/
- 87 ls
- 88 vim enforce-selinux.yml
- 89 cd ../../projectone/
- 90 ansible all -m ping
- 91 ansible all -m user -a "name=lisa"
- 92 ansible all -m command -a "id lisa"
- 93 ansible all -m user -a "name=lisa state=absent"
- 94 ansible all -m command -a "id lisa"
- 95 ansible centos7 -m command -a "rpm -qa | grep python"
- 96 ansible centos7 -m shell -a "rpm -qa | grep python"
- 97 ansible all -m copy -a 'content="hello world" dest=/etc/motd'
- 98 ansible all -m command -a "cat /etc/motd"
- 99 ansible all -m package -a "name=nmap state=latest"
- 100 ansible all -m service -a "name=httpd state=started"
- 101 cd ../ansibleinthreeweeks/
- 102 ls
- 103 cd basics/
- 104 ls
- 105 cp ../../projectone/* .
- 106 ls
- 107 vim install_and_start_httpt.yaml
- 108 ansible-doc service
- 109 ls
- 110 ansible-playbook install_and_start_httpt.yaml
- 111 cd ..
- 112 ../luth/countdown 25
- 113 vim kp.yaml
- 114 ansible-doc service
- 115 vim kp.yaml
- 116 ansible-doc firewalld
- 117 vim kp.yaml
- 118 ansible-playbook kp.yaml
- 119 cd ../projectone/
- 120 ansible-playbook ../ansibleinthreeweeks/kp.yaml
- 121 cd ../ansibleinthreeweeks/basics/
- 122 ls
- 123 vim multi_play.yaml
- 124 cp ../../projectone/inventory .
- 125 ansible-playbook multi_play.yaml
- 126 vim multi_play.yaml
- 127 ansible-doc yum
- 128 vim multi_play.yaml
- 129 ansible-doc yum
- 130 ansible-playbook multi_play.yaml
- 131 cd ../..
- 132 git clone https://github.com/sandervanvugt/rhce8-live
- 133 cd rhce8-live/
- 134 ls
- 135 cd lesson16/
- 136 ls
- 137 vim software-advanced.yml
- 138 vim setup-rhel.yml
- 139 grep prompt *
- 140 cd ..
- 141 grep -r prompt *
- 142 cat lesson15/assertsize.yml
- 143 cd lesson16/
- 144 ls
- 145 vim setup-rhel.yml
- 146 ansible-playbook setup-rhel.yml
- 147 vim inventory
- 148 ansible-playbook setup-rhel.yml
- 149 vim setup-rhel.yml
- 150 cp setup-rhel.yml ~/ansibleinthreeweeks/
- 151 cd ~/ansibleinthreeweeks/
- 152 ls
- 153 cd basics/
- 154 ls
- 155 ansible-playbook playbook_with_errors.yaml
- 156 vim playbook_with_errors.yaml
- 157 ansible-playbook playbook_with_errors.yaml
- 158 vim playbook_with_errors.yaml
- 159 ansible-playbook playbook_with_errors.yaml
- 160 vim playbook_with_errors.yaml
- 161 ansible-playbook playbook_with_errors.yaml
- 162 vim playbook_with_errors.yaml
- 163 pwd
- 164 ../../luth/countdown 12
- 165 cd ..
- 166 cd basics/
- 167 vim inventory
- 168 ansible rhel84 -a "yum repolist"
- 169 ls
- 170 vim variables_example.yaml
- 171 ansible-playbook variables_example.yaml
- 172 ansible-playbook variables_example.yaml -e user=bob
- 173 vim variables_example.yaml
- 174 ansible rhel84 -m setup > rhelfacts.txt
- 175 less rhelfacts.txt
- 176 ansible-doc -l | grep fact
- 177 ansible-doc -l | grep _fact
- 178 vim gather_facts.yaml
- 179 less rhelfacts.txt
- 180 ansible-playbook gather_facts.yaml
- 181 ls
- 182 vim old_facts.yaml
- 183 ansible-playbook old_facts.yaml
- 184 vim new_facts.yaml
- 185 ansible-playbook new_facts.yaml
- 186 vim new_facts.yaml
- 187 vim myvars.yaml
- 188 vim vars_file.yaml
- 189 ansible-playbook vars_file.yaml
- 190 ls
- 191 cp vars_file.yaml vars_host.yaml
- 192 mkdir host_vars
- 193 vim vars_host.yaml
- 194 vim host_vars/centos7
- 195 ansible-playbook vars_host.yaml
- 196 vim host_vars/centos7
- 197 ansible-playbook vars_host.yaml
- 198 cd ../
- 199 cd ../rhce8-live/lesson5/
- 200 ls
- 201 cd webservers/
- 202 ls
- 203 cat group_vars/lamp
- 204 vim site.yml
- 205 cd ../..
- 206 pwd
- 207 cd ../ansibleinthreeweeks/
- 208 cd basics/
- 209 ls
- 210 vim host_vars/centos7
- 211 ansible-playbook vars_host.yaml
- 212 cd ../..
- 213 cd rhce8-live/lesson16/
- 214 ls
- 215 vim software-advanced.yml
- 216 cd
- 217 history
- 218 sudo poweroff
- 219 sudo vim /etc/hosts
- 220 ip a
- 221 sudo vim /etc/hosts
- 222 cd ansibleinthreeweeks/
- 223 vim inventory
- 224 cd basics/
- 225 vim inventory
- 226 cp inventory ..
- 227 ansible all -m copy -a "src=/etc/hosts dest=/etc/hosts"
- 228 ssh-copy-id tower
- 229 exit
- 230 ansible all -m copy -a "src=/etc/hosts dest=/etc/hosts"
- 231 cd ansibleinthreeweeks/basics/
- 232 vim ansible.cfg
- 233 ansible tower -m copy -a "src=/etc/hosts dest=/etc/hosts"
- 234 exit
- 235 history
- 236 cd ansibleinthreeweeks/
- 237 ls
- 238 find . -name "create-users.yml"
- 239 cd ..
- 240 find . -name "create-users.yml"
- 241 ls
- 242 find . -name "create-users.*"
- 243 cd rhce8-live/
- 244 ls
- 245 cd lesson5/
- 246 ls
- 247 cd ../lesson7/
- 248 ls
- 249 cd vault/
- 250 ls
- 251 cd ../..
- 252 cd ../ansibleinthreeweeks/
- 253 find . -name "create-user.*"
- 254 ls
- 255 ansible-vault create secret.yml
- 256 ansible-vault edit secret.yml
- 257 vim create-user.yml
- 258 ansible-playbook create-user.yml
- 259 ansible-playbook --ask-vault-pass create-user.yml
- 260 echo password > vault-pass
- 261 ansible-playbook --vault-password-file=vault-pass create-user.yml
- 262 vim /etc/ansible/ansible.cfg
- 263 ls
- 264 cd templates/
- 265 ls
- 266 vim vsftpd-template.yml
- 267 vim vsftpd.j2
- 268 ansible-playbook vsftpd-template.yml
- 269 cp ../basics/inventory .
- 270 cat inventory
- 271 ansible-playbook vsftpd-template.yml
- 272 ls
- 273 cp ../basics/ansible.cfg .
- 274 cat ansible.cfg
- 275 ansible-playbook vsftpd-template.yml
- 276 vim vsftpd-template.yml
- 277 pwd
- 278 ansible rhel84 -m command -a "cat /etc/vsftpd/vsftpd.conf"
- 279 cd ..
- 280 ls
- 281 cd task_control/
- 282 ls
- 283 vim handlers.yml
- 284 echo hello world > /tmp/index.html
- 285 cp ../basics/inventory .
- 286 ansible-playbook handlers.yml
- 287 cp ../basics/ansible.cfg .
- 288 ansible-playbook handlers.yml
- 289 vim handlers.yml
- 290 ansible-playbook handlers.yml
- 291 ansible all -m file -a "name=/tmp/index.html state=absent"
- 292 ansible all -m file -a "name=/var/www/html/index.html state=absent"
- 293 ansible-playbook handlers.yml
- 294 cd ..
- 295 ls
- 296 luth/countdown 13
- 297 ip a
- 298 cd ansibleinthreeweeks/
- 299 ls
- 300 cd task_control/
- 301 ls
- 302 vim loopservices.yml
- 303 ansible-playbook loopservices.yml
- 304 vim inventory
- 305 ansible-playbook loopservices.yml
- 306 vim loopservices.yml
- 307 ansible-playbook loopservices.yml
- 308 ~/luth/countdown 12
- 309 ls
- 310 vim ifsize.yml
- 311 ansible-playbook ifsize.yml
- 312 vim ifsize.yml
- 313 ansible-playbook ifsize.yml
- 314 lw
- 315 ls
- 316 vim when_multiple.yml
- 317 vim ifsize.yml
- 318 vim when_multiple.yml
- 319 ansible-playbook when_multiple.yml
- 320 cd ..
- 321 ls
- 322 cd roles
- 323 ls
- 324 cd ..
- 325 cd roles
- 326 ansible-galaxy install geerlingguy.nginx
- 327 cd ~/.ansible/roles/geerlingguy.nginx/
- 328 tree
- 329 vim tasks/main.yml
- 330 vim tasks/setup-RedHat.yml
- 331 cd ..
- 332 pwd
- 333 cd ~/ansibleinthreeweeks/roles/
- 334 ls
- 335 vim nginx-role.yml
- 336 ansible-playbook nginx-role.yml
- 337 cp ../basics/ansible.cfg .
- 338 cp ../basics/inventory .
- 339 ansible-playbook nginx-role.yml
- 340 pwd
- 341 cd
- 342 luth/countdown 20
- 343 ls
- 344 git clone https://github.com/sandervanvugt/rhce8-book
- 345 cd rhce8-book/
- 346 grep tag *
- 347 vim exercise123.yaml
- 348 ansible-playbook --list-tags exercise123.yaml
- 349 vim exercise123.yaml
- 350 ansible-playbook --list-tags exercise123.yaml -e newhost=tower -e newhostip=192.168.29.20
- 351 ansible-playbook --prompt-vault-pass --list-tags exercise123.yaml -e newhost=tower -e newhostip=192.168.29.20
- 352 ansible-playbook --ask-vault-pass --list-tags exercise123.yaml -e newhost=tower -e newhostip=192.168.29.20
- 353 vim exercise123.yaml
- 354 ansible-playbook exercise123.yaml --tags add-host -e newhost=tower -e newhostip=192.168.29.20
- 355 vim exercise123.yaml
- 356 ansible-playbook exercise123.yaml --tags addhost -e newhost=tower -e newhostip=192.168.29.20
- 357 ansible tower -m setup
- 358 grep vgs *
- 359 vim exercise153.yaml
- 360 cd ../ansibleinthreeweeks/
- 361 find . -name "sync*"
- 362 vim synchronize.yaml
- 363 ansible all -m command -a "grep requiretty /etc/sudoers"
- 364 ansible all -m command -a "grep wheel /etc/sudoers"
- 365 ansible-doc -t callback -l
- 366 ansible-doc -t callback yamlize
- 367 ansible-doc -t callback -l
- 368 ansible-doc -t callback yaml
- 369 ls
- 370 cd plugins/
- 371 ls
- 372 vim ansible.cfg
- 373 sudo cgcreate -a ansible:ansible -t ansible:ansible -g cpuacct,memory,pid:ansible_profile
- 374 sudo yum provides */cgcreate
- 375 sudo yum install libcgroup-tools
- 376 sudo cgcreate -a ansible:ansible -t ansible:ansible -g cpuacct,memory,pid:ansible_profile
- 377 pwd
- 378 ../../luth/countdown 12
- 379 sudo vim /etc/default/grub
- 380 sudo grub2-mkconfig -o /boot/grub2/grub.cfg
- 381 sudo reboot
- 382 luth/countdown 5
- 383 sudo cgcreate -a ansible:ansible -t ansible:ansible -g cpuacct,memory,pid:ansible_profile
- 384 mount | grep cgroup
- 385 sudo cgcreate -a ansible:ansible -t ansible:ansible -g cpuacct,memory,pids:ansible_profile
- 386 #cgexec -g cpuacct,memory,pids:ansible_profile ansible_playbook
- 387 cd ansibleinthreeweeks/
- 388 ls
- 389 cd plugins/
- 390 ls
- 391 cgexec -g cpuacct,memory,pids:ansible_profile ansible_playbook hello.yml
- 392 vim ansible.cfg
- 393 ansible-playbook hello.yml
- 394 cd ..
- 395 cd filters/
- 396 ls
- 397 vim int-filter.yaml
- 398 ansible-playbook int-filter.yaml
- 399 vim int-filter.yaml
- 400 ansible-playbook int-filter.yaml
- 401 vim int-filter.yaml
- 402 ansible-playbook int-filter.yaml
- 403 ls -l /tmp
- 404 vim storage-filter.yaml
- 405 vim assert_filter.yaml
- 406 ansible-playbook assert_filter.yaml
- 407 vim assert_filter.yaml
- 408 ansible-playbook assert_filter.yaml
- 409 vim assert_filter.yaml
- 410 vim password_hash.yaml
- 411 sudo cat /etc/shadow
- 412 vim password_hash.yaml
- 413 cp password_hash.yaml passdumb.yaml
- 414 vim passdumb.yaml
- 415 ansible-playbook passdumb.yaml -e user=lisa
- 416 cp ../basics/inventory .
- 417 cp ../basics/ansible.cfg .
- 418 ansible-playbook passdumb.yaml -e user=lisa
- 419 ansible rhel84 -a "cat /etc/shadow"
- 420 vim password_hash.yaml
- 421 ansible-playbook password_hash.yaml
- 422 ansible rhel84 -a "cat /etc/shadow"
- 423 history
- 424 cat passdumb.yaml
- 425 sudo poweroff
- 426 sudo reboot
- 427 ../luth/countdown 13
- 428 cd windows/
- 429 ls
- 430 cat pw.yaml
- 431 ansible-vault edit pw.yaml
- 432 vim createad.yml
- 433 ansible-playbook --ask-vault-pass createad.yml
- 434 ansible-doc virt
- 435 ansible-doc -l | grep virt
- 436 ansible-doc -l | grep libvirt
- 437 ansible-doc -l | grep virt
- 438 ansible-doc -l | grep vsphere
- 439 exit
- 440 ip a
- 441 ../luth/countdown 22
- 442 exit
- 443 ip a
- 444 sudo vim /etc/hosts
- 445 cd ansibleinthreeweeks/windows/
- 446 cat inventory
- 447 ls
- 448 cd ..
- 449 git pull\
- 450 git pull
- 451 cd windows/
- 452 ls
- 453 cat ansible.cfg
- 454 cat inventory
- 455 sudo vim /etc/hosts
- 456 sudo pip3 install pywinrm
- 457 ansible win -m win_ping
- 458 ansible-doc -l | grep '^win' | less
- 459 ansible win -m setup | less
- 460 vim playbook.yml
- 461 ansible-playbook playbook.yml
- 462 ls
- 463 vim createad.yml
- 464 ansible-playbook createad.yml
- 465 cat createad.yml
- 466 ls
- 467 vim createad.yml
- 468 ansible-vault --help
- 469 ansible-vault create vault/pw.yaml
- 470 mkdir vault
- 471 ls -l
- 472 ansible-playbook --ask-vault-pass createad.yml
- 473 cat createad.yml
- 474 vim createad.yml
- 475 vim ../create-user.yml
- 476 ls
- 477 vim createad.yml
- 478 ansible-playbook --ask-vault-pass createad.yml
- 479 vim vault/pw.yaml
- 480 ansible-vault edit pw.yaml
- 481 ansible-vault edit vault/pw.yaml
- 482 vim ../vault-pass
- 483 cd ..
- 484 cat create-user.yml
- 485 ls
- 486 ansible-vault secret.yml
- 487 ansible-vault edit secret.yml
- 488 cd windows/vault/
- 489 ansible-vault edit pw.yaml
- 490 vim ../createad.yml
- 491 cd ..
- 492 vim createad.yml
- 493 ansible-playbook --ask-vault-pass createad.yml
- 494 ls
- 495 cp vault/pw.yaml .
- 496 ansible-playbook --ask-vault-pass createad.yml
- 497 vim createad.yml
- 498 ls -l
- 499 ansible-playbook --ask-vault-pass createad.yml
- 500 cd ..
- 501 ansible-doc -l | grep docker
- 502 ls
- 503 vim docker_main.yaml
- 504 vim docker-ubuntu.yaml
- 505 vim docker-centos.yaml
- 506 ansible-playbook docker_main.yaml
- 507 ansible ubuntu -a "ip a"
- 508 ssh ubuntu
- 509 vim docker-ubuntu.yaml
- 510 ssh ubuntu
- 511 vim docker-ubuntu.yaml
- 512 ansible-playbook docker_main.yaml
- 513 cim docker.yaml
- 514 vim docker.yaml
- 515 ansible-doc -l | grep ios
- 516 ssh ansible@192.168.50.136
- 517 exit
- 518 cd ..
- 519 ls
- 520 ../luth/countdown 13
- 521 exit
- 522 sudo vim /etc/ansible/ansible.cfg
- 523 cd ansibleinthreeweeks/windows/
- 524 ansible-inventory --yaml -i inventory --list --output inventory.yaml
- 525 vim inventory.yaml
- 526 cd
- 527 sudo pip3 install bot bot3
- 528 sudo pip3 install boto boto3
- 529 python3
- 530 cd ansibleinthreeweeks/ec2/
- 531 ls
- 532 tree
- 533 ls
- 534 ls -l
- 535 vim list-instances.yml
- 536 ansible-playbook list-instances.yml
- 537 ansible-playbook --ask-vault-pass list-instances.yml
- 538 ls
- 539 vim ubuntu-new.yaml
- 540 ansible-playbook ubuntu-new.yaml --ask-vault-pass
- 541 ansible-playbook --ask-vault-pass list-instances.yml
- 542 ls
- 543 cd
- 544 dnf provides */aws
- 545 sudo dnf install awscli
- 546 aws ec2 describe-instances --region us-west-2
- 547 ansible localhost -m ec2 -a 'instance_id=i-06d5f79ba626dd2b2 state=absent region=us-west-2'
- 548 ansible localhost -m ec2 -a 'instance_id=i-06d5f79ba626dd2b2 state=absent region=us-west-2' -e aws_access_key=$aws_access_key -e aws_secret_key=$aws_secret_key
- 549 luth/countdown 12
- 550 cd ansibleinthreeweeks/
- 551 cd docker/
- 552 ls
- 553 cp ../ansible.cfg .
- 554 cp ../inventory .
- 555 vim newdocker.yaml
- 556 vim inventory
- 557 ansible-playbook newdocker.yaml
- 558 vim newdocker.yaml
- 559 ansible-playbook newdocker.yaml
- 560 vim newdocker.yaml
- 561 ansible-playbook newdocker.yaml
- 562 cd ..
- 563 vim docker-ubuntu.yaml
- 564 cd docker/
- 565 ls
- 566 vim newdocker.yaml
- 567 ansible-playbook newdocker.yaml
- 568 vim ../docker-ubuntu.yaml
- 569 vim newdocker.yaml
- 570 ansible-playbook --tags rundocker newdocker.yaml
- 571 vim newdocker.yaml
- 572 ansible-playbook --tags rundocker newdocker.yaml
- 573 vim ../docker-ubuntu.yaml
- 574 ansible ubuntu -m package -a "name=pip3 state=latest"
- 575 ansible ubuntu -m package -a "name=pip state=latest"
- 576 vim newdocker.yaml
- 577 ansible-playbook newdocker.yaml
- 578 history
- #####Last playbook troubleshooting failing docker stuff[ansible@controller docker]$ cat newdocker.yaml
- - name: developing docker o ubuntu setup
- hosts: ubuntu
- tasks:
- - name: run apt update
- command: apt-get update
- - name: install prereq packages
- package:
- name:
- - apt-transport-https
- - ca-certificates
- - curl
- - gnupg-agent
- - software-properties-common
- - pip
- state: latest
- - name: import repo gpg key
- shell: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
- - name: add repo
- shell: add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- - name: apt update
- command: apt-get update
- - name: install packages
- package:
- name:
- - docker-ce
- - docker-ce-cli
- - containerd.io
- state: latest
- - debug:
- msg: if you come this far, change all command and shell modules for something better
- tags: setupdocker
- - name: running the docker container
- hosts: ubuntu
- tasks:
- - name: install docker pip module
- pip:
- name: docker
- - name: start and enable docker daemon
- service:
- name: docker
- enabled: yes
- state: started
- - name: create container
- docker_container:
- name: mynginx
- image: nginx
- state: started
- - name: generate a list of running containers
- command: docker ps
- register: dockerps
- - name: show list of running containers
- debug:
- var: dockerps.stdout
- tags: rundocker
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement