Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ansible@controller filters]$ 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*
- 393 vim ansible.cfg
- 394 ansible-playbook hello.yml
- 395 cd ..
- 396 cd filters/
- 397 ls
- 398 vim int-filter.yaml
- 399 ansible-playbook int-filter.yaml
- 400 vim int-filter.yaml
- 401 ansible-playbook int-filter.yaml
- 402 vim int-filter.yaml
- 403 ansible-playbook int-filter.yaml
- 404 ls -l /tmp
- 405 vim storage-filter.yaml
- 406 vim assert_filter.yaml
- 407 ansible-playbook assert_filter.yaml
- 408 vim assert_filter.yaml
- 409 ansible-playbook assert_filter.yaml
- 410 vim assert_filter.yaml
- 411 vim password_hash.yaml
- 412 sudo cat /etc/shadow
- 413 vim password_hash.yaml
- 414 cp password_hash.yaml passdumb.yaml
- 415 vim passdumb.yaml
- 416 ansible-playbook passdumb.yaml -e user=lisa
- 417 cp ../basics/inventory .
- 418 cp ../basics/ansible.cfg .
- 419 ansible-playbook passdumb.yaml -e user=lisa
- 420 ansible rhel84 -a "cat /etc/shadow"
- 421 vim password_hash.yaml
- 422 ansible-playbook password_hash.yaml
- 423 ansible rhel84 -a "cat /etc/shadow"
- 424 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement