Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ansible@control rhce9]$ history
- 1 cat >> inventory <<EOF
- 2 ansible1
- 3 ansible
- 4 ansible3
- 5 EOF
- 6 cat inventory
- 7 vim inventory
- 8 ping ansible1
- 9 sudo vim /etc/hosts
- 10 vim inventory
- 11 ansible -i inventory all -u student -k -b -K -m user -a "name=ansible"
- 12 ssh student@ansible1
- 13 ssh student@ansible2
- 14 ssh student@ansible3
- 15 ansible -i inventory all -u student -k -b -K -m user -a "name=ansible"
- 16 history
- 17 ansible -i inventory all -u student -k -b -K -m shell -a "echo password | passwd --stdin ansible"
- 18 ssh ansible@ansible2
- 19 ssh-keygen
- 20 for i in ansible1 ansible2 ansible3; do ssh-copy-id $i; done
- 21 ssh ansible@ansible3
- 22 ansible -i inventory all -u ansible -m command -a "whoami"
- 23 ansible -i inventory all -u ansible -b -K -m command -a "whoami"
- 24 ansible -i inventory all -u student -k -b -K -m shell -a 'echo "ansible ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ansible'
- 25 history
- 26 sudo dnf install -y git
- 27 git clone https://github.com/sandervanvugt/rhce9
- 28 cd rhce9/
- 29 ls
- 30 ./countdown 15
- 31 cat inventory
- 32 history
- 33 cat inventory
- 34 ls
- 35 cat /etc/ansible/hosts
- 36 ansible -i inventory all --list-hosts
- 37 ansible -i inventory file --list-hosts
- 38 cd rhce9/
- 39 vim ansible.cfg
- 40 history | grep git
- 41 vim ansible.cfg
- 42 ansible all -a "whoami"
- 43 history | grep sudoer
- 44 id
- 45 ansible --version
- 46 cd ..
- 47 ansible --version
- 48 cd rhce9/
- 49 cat inventory
- 50 rm -f inventory
- 51 ansible all -a "whoami"
- 52 cp ../inventory .
- 53 ansible all -a "whoami"
- 54 rm inventory
- 55 ansible all -m user -a "name=bob"
- 56 ansible localhost -m user -a "name=bob"
- 57 ansible localhost -m user -a "name=bob" -K
- 58 ansible all -m command -a "useradd lisa"
- 59 cp ../inventory .
- 60 ansible all -m command -a "useradd lisa"
- 61 ansible all -m user -a "name=lisa"
- 62 ansible-doc user
- 63 vim /usr/lib/python3.9/site-packages/ansible/modules/user.py
- 64 ansible-doc -l
- 65 ansible-doc -l | wc -l
- 66 ansible-doc user
- 67 ansible all -m ping
- 68 ansible all -m service -a "name=sshd state=started"
- 69 ansible all -m command -a "/sbin/reboot -t now"
- 70 ansible all -m command -a "/sbin/reboot"
- 71 ansible all -m ping
- 72 ansible all -m command -a "rpm -qa | grep bash"
- 73 ansible all -m shell -a "rpm -qa | grep bash"
- 74 ansible all -m copy -a 'content="hello world" dest=/tmp/hellofile'
- 75 ansible all -a "cat /tmp/hellofile"
- 76 history
- 77 ansible-doc -l | grep package
- 78 ansible-doc package
- 79 ansible all -m package -a "name=nmap state=present"
- 80 ansible all -a "which nmap"
- 81 ls
- 82 vim vsftpd.yml
- 83 ansible-playbook vsftpd.yml
- 84 ansible-doc yum
- 85 vim vsftpd.yml
- 86 ansible-playbook vsftpd.yml
- 87 ping ansible2.example.com
- 88 vim inventory
- 89 vim vsftpd.yml
- 90 ansible-playbook vsftpd.yml
- 91 vim vsftpd.yml
- 92 ansible-playbook vsftpd.yml
- 93 vim vsftpd.yml
- 94 vim inventory
- 95 ansible-playbook vsftpd.yml
- 96 ansible-playbook -vvvvv vsftpd.yml
- 97 ansible-playbook --syntax-check vsftpd-err.yml
- 98 ansible-playbook vsftpd-err.yml
- 99 vim vsftpd-err.yml
- 100 ansible-playbook -C vsftpd-err.yml
- 101 vim vsftpd-err.yml
- 102 ansible-playbook -C vsftpd-err.yml
- 103 history
- 104 vim lab3.yml
- 105 ansible-playbook lab3.yml
- 106 vim lab3.yml
- 107 ansible-playbook lab3.yml
- 108 history
- 109 cat lab3.yml
- 110 ls
- 111 vim variables.yml
- 112 ansible-playbook variables.yml
- 113 vim variables.yml
- 114 ansible-playbook variables.yml
- 115 vim variables.yml
- 116 ansible-playbook variables.yml
- 117 vim variables.yml
- 118 ansible-playbook variables.yml
- 119 ansible-playbook variables.yml -e username=anna
- 120 vim variables.yml
- 121 vim usernames.yml
- 122 ansible-playbook variables.yml
- 123 vim usernames.yml
- 124 vim variables.yml
- 125 grep set_fact *
- 126 vim set-fact.yaml
- 127 ansible-playbook set-fact.yaml
- 128 vim set-fact.yaml
- 129 ansible-playbook set-fact.yaml
- 130 vim set-fact.yaml
- 131 ansible-playbook set-fact.yaml
- 132 vim set-fact.yaml
- 133 vim vars_prompt.yaml
- 134 ansible-playbook vars_prompt.yaml
- 135 vim vars_prompt.yaml
- 136 ansible-playbook vars_prompt.yaml
- 137 cat vars_prompt.yaml
- 138 mkdir group_vars
- 139 vim group_vars/centos
- 140 history
- 141 vim variables.yml
- 142 ansible-playbook variables.yml
- 143 vim variables.yml
- 144 mkdir host_vars
- 145 vim host_vars/ansible1
- 146 ansible-playbook variables.yml
- 147 vim variables.yml
- 148 ansible-playbook variables.yml
- 149 cat variables.yml
- 150 cat host_vars/ansible1
- 151 cat group_vars/centos
- 152 history
- 153 ansible-vault create secret.yml
- 154 cat secret.yml
- 155 ansible-vault --help
- 156 ansible-vault view secret.yml
- 157 ls
- 158 git pull
- 159 cd vault/
- 160 ls
- 161 vim create-user.yml
- 162 ansible-playbook create-user.yml
- 163 ansible-playbook --ask-vault-pass create-user.yml
- 164 vim inventory
- 165 ansible all -a "tail -1 /etc/shadow"
- 166 echo password > vault-pass
- 167 ansible-playbook --vault-password-file=vault-pass create-user.yml
- 168 history
- 169 cat create-user.yml
- 170 vim userfile
- 171 ansible-vault create pwfile
- 172 vim lab4.yml
- 173 ansible-playbook lab4.yml
- 174 ansible-playbook --ask-vault-pass lab4.yml
- 175 ansible all -a "tail /etc/shadow"
- 176 cd ..
- 177 cd vault/
- 178 cat lab4.yml
- 179 cat userfile
- 180 ansible-vault view pwfile
- 181 cat pwfile
- 182 cd ..
- 183 ansible ansible1 -m setup
- 184 ansible ansible1 -m setup | less
- 185 git pull
- 186 cd lesson7/
- 187 ls
- 188 cd facts/
- 189 ls
- 190 vim facts.yml
- 191 ansible-playbook facts.yml | less
- 192 vim ipfact.yml
- 193 ansible-playbook ipfact.yml
- 194 vim ipfact.yml
- 195 vim inventory
- 196 vim ipfact.yml
- 197 ls
- 198 vim newlocalfacts.yml
- 199 vim inventory
- 200 vim newlocalfacts.yml
- 201 vim localfacts.fact
- 202 ansible-playbook newlocalfacts.yml
- 203 ansible ansible2.example.com -m setup -a "filter=ansible_local"
- 204 ansible_facts.ansible_local.localfacts.mylocalfacts.package
- 205 vim factcheck.yml
- 206 ansible-playbook factcheck.yml
- 207 vim factcheck.yml
- 208 ansible-playbook factcheck.yml
- 209 cat factcheck.yml
- 210 ansible all -m setup -a filter "ansible_mounts"
- 211 ansible all -m setup -a "filter=ansible_mounts"
- 212 ansible all -m setup | less
- 213 ansible ansible2.example.com -m setup -a "filter=ansible_facts"
- 214 ansible ansible2.example.com -m setup -a "filter=ansible_mounts"
- 215 cd ..
- 216 ls
- 217 cd ..
- 218 cd lesson7/facts/
- 219 ls
- 220 vim ipfact.yml
- 221 ansible all -m setup -a "filter=ansible_facts.ansible_apparmor"
- 222 ansible all -m setup -a "filter=ansible_facts.apparmor"
- 223 ansible all -m setup -a "filter=ansible_apparmor"
- 224 ansible all -m debug -a "var=ansible_facts.apparmor"
- 225 ansible all -m debug -a "var=ansible_apparmor"
- 226 vim debugme.yml
- 227 ansible-playbook debugme.yml
- 228 cd ..
- 229 ls
- 230 grep loop *
- 231 grep -l loop *
- 232 grep -l loop * 2>/dev/null
- 233 vim loopservices.yml
- 234 ansible-playbook loopservices.yml
- 235 vim loopservices.yml
- 236 vim loop-over-variable.yml
- 237 vim loopvars.yml
- 238 ansible-playbook loop-over-variable.yml
- 239 vim loopvars.yml
- 240 vim loop-over-variable.yml
- 241 grep -l loop * 2>/dev/null
- 242 vim loopusers.yml
- 243 ansible-playbook loopusers.yml
- 244 grep with_ * 2>/dev/null
- 245 vim changeconfig.yaml
- 246 vim changeconfig.yaml regme.yaml
- 247 cp changeconfig.yaml regme.yaml
- 248 vim regme.yaml
- 249 git clone https://github.com/sandervanvugt/rhce8-live
- 250 ansible-playbook regme.yaml
- 251 ansible-playbook regme.yaml -K
- 252 vim regme.yaml
- 253 ansible-playbook regme.yaml
- 254 vim regme.yaml
- 255 ansible-playbook regme.yaml
- 256 vim regme.yaml
- 257 ansible-playbook regme.yaml
- 258 history
- 259 vim changeconfig.yaml
- 260 vim regme.yaml
- 261 ansible-playbook regme.yaml
- 262 vim changeconfig.yaml
- 263 ansible-playbook changeconfig.yaml
- 264 vim changeconfig.yaml
- 265 ansible-playbook changeconfig.yaml
- 266 vim changeconfig.yaml
- 267 ansible-playbook changeconfig.yaml
- 268 vim changeconfig.yaml
- 269 history
- 270 grep -l register * 2>/dev/null
- 271 vim register_command.yml
- 272 ansible-playbook register_command.yml
- 273 grep -l when * 2>/dev/null
- 274 vim distro.yml
- 275 vim group_vars/all
- 276 ansible-playbook distro.yml
- 277 vim group_vars/all
- 278 ansible-playbook distro.yml
- 279 grep -l when * 2>/dev/null
- 280 vim checkseconddisk.yml
- 281 ansible-playbook checkseconddisk.yml
- 282 vim checkseconddisk.yml
- 283 grep -l when * 2>/dev/null
- 284 vim when_multiple.yml
- 285 ansible-playbook when_multiple.yml
- 286 vim when_multiple.yml
- 287 ansible-playbook when_multiple.yml
- 288 vim when_multiple_complex.yml
- 289 ansible-doc shell
- 290 vim when_multiple_complex.yml
- 291 ansible-playbook when_multiple_complex.yml
- 292 vim when_multiple_complex.yml
- 293 grep -l ansible_mount * 2>/dev/null
- 294 vim ifsize.yml
- 295 ansible-playbook ifsize.yml
- 296 history
- 297 cat ifsize.yml
- 298 cat group_vars/all
- 299 ls host_vars/ group_vars/
- 300 cat group_vars/all
- 301 cat group_vars/centos
- 302 history
- 303 grep handler -l * 2>/dev/null
- 304 vim handlers.yml
- 305 echo hello > /tmp/index.html
- 306 ansible-playbook handlers.yml
- 307 vim handlers.yml
- 308 ansible-playbook handlers.yml
- 309 ansible all -m file -a "name=/var/www/html/index.html state=absent"
- 310 ansible-playbook handlers.yml
- 311 grep -l block * 2>/dev/null
- 312 cat copy.yml
- 313 vim blocks.yml
- 314 ansible-playbook blocks.yml
- 315 vim block2.yaml
- 316 ansible-playbook block2.yaml
- 317 grep -l failed_when * 2>/dev/null
- 318 vim failure.yml
- 319 ansible-playbook failure.yml
- 320 grep -l fail * 2>/dev/null
- 321 vim setupnewhost.yml
- 322 ansible-playbook setupnewhost.yml
- 323 ansible-playbook setupnewhost.yml -e newhost=dummy -e newhostip=10.0.0.10 -K
- 324 cat /etc/hosts
- 325 cat inventory
- 326 grep -l changed_when * 2>/dev/null
- 327 vim changed.yml
- 328 ansible-playbook changed.yml
- 329 vim inventory
- 330 vim changed.yml
- 331 ansible-playbook changed.yml
- 332 vim changed.yml
- 333 ansible-playbook changed.yml
- 334 ls
- 335 grep -l selinux * 2>/dev/null
- 336 vim enforce-selinux.yml
- 337 ansible-playbook enforce-selinux.yml -K
- 338 ansible-galaxy collections list
- 339 ansible-galaxy collection list
- 340 ansible-galaxy collection
- 341 ansible-galaxy collection -h
- 342 ansible-galaxy collection list
- 343 ansible-doc -l | less
- 344 ansible-galaxy collection install ansible.posix
- 345 ansible-doc -l | less
- 346 ansible-playbook enforce-selinux.yml -K
- 347 vim enforce-selinux.yml
- 348 vim enforce-selinux-simplified.yml
- 349 ansible-playbook enforce-selinux-simplified.yml
- 350 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement