Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ansible@control ~]$ history
- 1 sudo dnf install -y epel-release
- 2 cat /etc/redhat-release
- 3 sudo dnf install ansible
- 4 ansible --version
- 5 history
- 6 sudo dnf install vim git -y
- 7 git clone https://github.com/sandervanvugt/rhce8-live
- 8 cd rhce8-live/
- 9 ls
- 10 cd
- 11 ip a
- 12 sudo vim /etc/hosts
- 13 ping ansible1
- 14 ping ansible2
- 15 ssh root@ansible1
- 16 ssh root@ansible2
- 17 history
- 18 cd rhce8-live/
- 19 ls
- 20 ./countdown 12
- 21 ansible-doc -l
- 22 ansible-doc -l | grep user
- 23 mkdir setup
- 24 cd setup/
- 25 vim inventory
- 26 ansible-doc user
- 27 ansible all -m user -a "name=ansible"
- 28 ansible all -m user -a "name=ansible" -i inventory
- 29 ansible all -m user -a "name=ansible" -i inventory -k
- 30 ansible all -m user -a "name=bob" -i inventory -k
- 31 ansible all -m user -a "name=bob" -i inventory -k -u root
- 32 ansible all -m user -a "name=ansible state=absent" -i inventory -k -u root
- 33 history
- 34 cat inventory
- 35 ansible all -m command -a "tail -3 /etc/passwd"
- 36 ansible all -m command -a "tail -3 /etc/passwd" -i inventory
- 37 ansible all -m command -a "tail -3 /etc/passwd" -i inventory -u root -k
- 38 ansible all -m user -a "name=ansible state=present" -i inventory -k -u root
- 39 ssh ansible@ansible2
- 40 history
- 41 sudo -i
- 42 ansible -i inventory all -m command -a "rpm -qa | grep util" -u root -k
- 43 ansible -i inventory all -m shell -a "rpm -qa | grep util" -u root -k
- 44 ansible -i inventory all -m shell -a "echo password | passwd --stdin ansible" -u root -k
- 45 ssh ansible@ansible1
- 46 ansible -i inventory all -m command -a "chown -R ansible:ansible /home/ansible" -u root -k
- 47 ansible -i inventory all -m command -a "ls -al /home/ansible" -u root -k
- 48 ssh ansible1
- 49 ssh ansible2
- 50 sudo vim /etc/hosts
- 51 history
- 52 ansible-doc copy
- 53 history
- 54 ansible -i inventory all -m copy -a 'content="ansible ALL=(ALL) NOPASSWD: ALL" -dest=/etc/sudoers.d/ansible' -u root -k
- 55 cat ~/.ssh/known_hosts
- 56 rm -f ~/.ssh/known_hosts
- 57 ansible -i inventory all -m copy -a 'content="ansible ALL=(ALL) NOPASSWD: ALL" -dest=/etc/sudoers.d/ansible' -u root -k
- 58 ssh ansible1
- 59 ssh ansible2
- 60 cat ~/.ssh/known_hosts
- 61 ansible -i inventory all -m copy -a 'content="ansible ALL=(ALL) NOPASSWD: ALL" -dest=/etc/sudoers.d/ansible' -u root -k
- 62 ansible -i inventory all -m copy -a 'content="ansible ALL=(ALL) NOPASSWD: ALL" dest=/etc/sudoers.d/ansible' -u root -k
- 63 ansible -i inventory all -m user -a "name=bob" -u ansible -k
- 64 ansible -i inventory all -m user -a "name=alice" -u ansible -k
- 65 ansible -i inventory all -m user -a "name=alice" -u ansible -k -b
- 66 ssh-keygen
- 67 ssh-copy-id ansible1
- 68 ssh-copy-id ansible2
- 69 ansible -i inventory all -m user -a "name=bob state=absent" -u ansible -b
- 70 history
- 71 ../countdown 12
- 72 sudo vim /etc/ansible/hosts
- 73 cd ../
- 74 ls
- 75 cd lesson2/
- 76 ls
- 77 cat inventory
- 78 ansible -i inventory all --list-hosts
- 79 ansible -i inventory web --list-hosts
- 80 vim ansible.cfg
- 81 sudo vim /etc/ansible/ansible.cfg
- 82 pwd
- 83 vim ansible.cfg
- 84 ansible all -m command -a "chown -R ansible:ansible /home/ansible"
- 85 vim ansible.cfg
- 86 ansible all -m command -a "chown -R ansible:ansible /home/ansible"
- 87 ansible --version
- 88 vim ansible.cfg
- 89 ansible localhost -m user -a "name=lisa"
- 90 vim ansible.cfg
- 91 sudo visudo
- 92 ansible localhost -m user -a "name=lisa"
- 93 echo $EDITOR
- 94 EDIT=/usr/bin/nano
- 95 export EDITOR=/usr/bin/nano
- 96 alias nanosudo=visudo
- 97 nanosudo
- 98 sudo nanosudo
- 99 ansible all -a "id lisa"
- 100 vim inventory
- 101 ansible all -m user -a "name=linda"
- 102 ansible all -m command -a "useradd bill"
- 103 ansible all -m user -a "name=bill"
- 104 history
- 105 ansible-doc user
- 106 ../countdown 15
- 107 ansible all -m package -a "name=nmap state=latest"
- 108 ansible all -m shell -a "rpm -qa | grep nmap"
- 109 ansible all -m service -a "name=httpd state=started"
- 110 cd ../lesson4/
- 111 ls
- 112 vim install-httpd.yml
- 113 ansible-doc copy
- 114 ansible-doc sync
- 115 ansible-doc -l | grep sync
- 116 ansible-doc synchronize
- 117 ls
- 118 vim vsftpd.yml
- 119 ansible-playbook vsftpd.yml
- 120 vim vsftpd.yml
- 121 ansible-doc service
- 122 vim vsftpd.yml
- 123 ansible-playbook vsftpd.yml
- 124 vim vsftpd.yml
- 125 ansible-playbook vsftpd.yml
- 126 vim vsftpd.yml
- 127 ansible-playbook -v vsftpd.yml
- 128 vim vsftpd.yml
- 129 ansible-playbook -v vsftpd.yml
- 130 ansible-playbook -vvvv vsftpd.yml
- 131 ansible-doc chkconfig
- 132 which chkconfig
- 133 ls -l /usr/sbin/chkconfig
- 134 sudo dnf provides */ansible-lint
- 135 sudo dnf install python3-ansible-lint
- 136 ansible-lint vsftpd.yml
- 137 ansible --syntax-check vsftpd.yml
- 138 ansible -C vsftpd.yml
- 139 ansible-playbook --syntax-check vsftpd.yml
- 140 history
- 141 history | less
- 142 cd ../lesson5/
- 143 ls
- 144 vim user.yml
- 145 ansible-playbook user.yml
- 146 vim user.yml
- 147 ansible-playbook user.yml
- 148 vim user.yml
- 149 vim inventory
- 150 ansible-playbook user.yml -e user=anna
- 151 vim user.yml
- 152 ansible-playbook user.yml -e user=anna
- 153 cd ../..
- 154 git clone https://github.com/sandervanvugt/ansibleinthreeweeks
- 155 cd ansibleinthreeweeks/
- 156 cd windows/
- 157 vim inventory
- 158 cd ../azure/
- 159 cd ../aws
- 160 cd ..
- 161 cd ../rhce8-live/lesson5/
- 162 ls
- 163 cd webservers/
- 164 ls
- 165 vim site.yml
- 166 cat inventory
- 167 ls group_vars/
- 168 cat group_vars/lamp
- 169 ansible-playbook site.yml
- 170 cd ../../..
- 171 cd ansibleinthreeweeks/
- 172 grep -R 'vars:'
- 173 cd cisco/
- 174 vim inventory-ios
- 175 cd ../../rhce8-live/lesson5/
- 176 ls
- 177 cat install_services.yml
- 178 cat packages.fact
- 179 cd ../lesson4/
- 180 ls
- 181 vim install-httpd.yml
- 182 cp install-httpd.yml uninstall-httpd.yml
- 183 vim uninstall-httpd.yml
- 184 ansible-playbook uninstall-httpd.yml
- 185 vim uninstall-httpd.yml
- 186 ansible-playbook uninstall-httpd.yml
- 187 vim uninstall-httpd.yml
- 188 ansible-playbook uninstall-httpd.yml
- 189 vim install-httpd.yml
- 190 ansible-playbook install-httpd.yml
- 191 ansible-playbook uninstall-httpd.yml
- 192 cd ../lesson7/
- 193 ansible-vault --help
- 194 ansible-vault create secrets.yaml
- 195 export EDITOR=/usr/bin/vim
- 196 alias
- 197 unalias nanosudo
- 198 cat secrets.yaml
- 199 ls
- 200 rm secrets.yaml
- 201 ansible-vault create secret.yml
- 202 mv secret.yml vault/
- 203 cd vault/
- 204 ls
- 205 vim create-user.yml
- 206 ansible-playbook create-user.yml
- 207 ansible-playbook --ask-vault-pass create-user.yml
- 208 ansible ansible2.example.com -a "tail -2 /etc/shadow"
- 209 echo password > vault-pass
- 210 rm vault-pass
- 211 echo password > ~/vault-pass
- 212 vim create-user.yml
- 213 ansible-playbook --vault-password-file=../../vault-pass create-user.yml
- 214 ansible-playbook --vault-password-file=../../../vault-pass create-user.yml
- 215 ansible-playbook --vault-password-file=~/vault-pass create-user.yml
- 216 vim lab4.txt
- 217 vim dg.yaml
- 218 ../../countdown 5
- 219 vim ansible1.fact
- 220 vim lab5.yaml
- 221 ansible-playbook lab5.yaml
- 222 vim lab5.yaml
- 223 ansible-playbook lab5.yaml
- 224 ansible ansible1.example.com -m setup -a "filter=ansible_local"
- 225 cat lab5.yaml
- 226 cat ansible1
- 227 cat ansible1.fact
- 228 eixt
- 229 exit
- 230 ../../countdown 15
- 231 vim setupfactcache.yaml
- 232 ansible-playbook setupfactcache.yaml
- 233 pwd
- 234 ip a
- 235 ls
- 236 pwd
- 237 ../../countdown 12
- 238 ansible-doc copy
- 239 ansible-doc firewalld
- 240 ansible-doc file
- 241 history | less
- 242 pwd
- 243 vim dg.yaml
- 244 cd ../lesson7/
- 245 ansible ansible1.example.com -m setup > facts.txt
- 246 ls
- 247 cd facts
- 248 ls
- 249 ansible ansible1.example.com -m setup > facts.txt
- 250 less facts.txt
- 251 ansible-doc -l | grep fact
- 252 pwd
- 253 vim ../../ansible.cfg
- 254 cp ../../lesson5/ansible.cfg
- 255 cp ../../lesson5/ansible.cfg ../../
- 256 vim ../../ansible.cfg
- 257 cp ../../ansible.cfg .
- 258 sudo dnf install -y redis
- 259 sudo systemctl enable --now redis
- 260 sudo pip3 install redis
- 261 ansible all -m setup
- 262 ls
- 263 vim facts.yml
- 264 cat ansible.cfg
- 265 ansible-playbook facts.yml
- 266 cat facts.yml
- 267 sudo systemctl status redis
- 268 history
- 269 cat ansible.cfg
- 270 cd
- 271 mv rhce8-live rhce8-live.old
- 272 git clone https://github.com/sandervanvugt/rhce8-live
- 273 cd rhce8-live/lesson7/facts/
- 274 l;s
- 275 ls
- 276 vim ipfact.yml
- 277 ansible-playbook ipfact.yml
- 278 vim ipfact.yml
- 279 ansible-playbook ipfact.yml
- 280 cat ipfact.yml
- 281 ls
- 282 vim newlocalfacts.yml
- 283 vim localfacts.fact
- 284 ansible-playbook newlocalfacts.yml
- 285 ansible all -m setup -a "filter=ansible_local"
- 286 vim localfacts.fact
- 287 history
- 288 cat localfacts.fact
- 289 cat newlocalfacts.yml
- 290 cd ../arrays/
- 291 ls
- 292 cat vars/users-dictionary
- 293 cat vars/users-list
- 294 vim multi-list.yml
- 295 ansible-playbook multi-list.yml
- 296 vim multi-dictionary.yml
- 297 ansible-playbook multi-dictionary.yml
- 298 cd ../..
- 299 ./countdown 12
- 300 ls
- 301 vim loop-over-dict.yaml
- 302 mv loop-over-dict.yaml lesson7/arrays/
- 303 cd lesson7/arrays/
- 304 vim loop-over-dict.yaml
- 305 cat vars/users-dictionary
- 306 vim loop-over-dict.yaml
- 307 ansible-playbook loop-over-dict.yaml
- 308 cd ../..
- 309 ls
- 310 cd lesson8/
- 311 ls
- 312 vim loopservices.yml
- 313 ansible-playbook loopservices.yml
- 314 ansible-doc yum
- 315 ansible-doc package
- 316 vim loopusers.yml
- 317 vim loop-over-variable.yml
- 318 cat loopvars.yml
- 319 ansible-playbook loop-over-variable.yml
- 320 vim register_loop.yml
- 321 ansible-playbook register_loop.yml
- 322 vim register_loop.yml
- 323 ansible-playbook register_loop.yml
- 324 vim register_command.yml
- 325 ansible-playbook register_command.yml
- 326 vim register_command.yml
- 327 ansible-playbook register_command.yml
- 328 history
- 329 exit
- 330 history
Advertisement
Add Comment
Please, Sign In to add comment