Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sible_ec2_instance_info_payload.zip/ansible/modules/cloud/amazon/ec2_instance_info.py\", line 514, in list_ec2_instances\nAttributeError: 'ClientError' object has no attribute 'message'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
- PLAY RECAP *********************************************************************************************
- localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
- [ansible@control ec2]$ ls
- add-instance.yml ec2.ini group_vars list-instances-new.yml myfile ubuntu-new.yaml
- ec2-deploy.yml ec2.py inventory list-instances.yml ubuntu-ami.yaml
- [ansible@control ec2]$ ansible-playbook --ask-vault-pass ubuntu-new.yaml
- Vault password:
- [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost
- does not match 'all'
- /usr/lib/python3.6/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.26.7) or chardet (3.0.4) doesn't match a supported version!
- RequestsDependencyWarning)
- PLAY [create an ubuntu instance on EC2] ****************************************************************
- TASK [Gathering Facts] *********************************************************************************
- ok: [localhost]
- TASK [start the instance] ******************************************************************************
- fatal: [localhost]: FAILED! => {"changed": false, "msg": "Instance creation failed => AuthFailure: AWS was not able to validate the provided access credentials"}
- PLAY RECAP *********************************************************************************************
- localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
- [ansible@control ec2]$ history
- 1 ip a
- 2 sudo vi /etc/hosts
- 3 cat /etc/hosts
- 4 sudo dnf install epel -y
- 5 sudo dnf install epel-release -y
- 6 sudo dnf install -y ansible
- 7 vim inventory
- 8 ping rocky
- 9 ping ubuntu
- 10 sudo vi /etc/hosts
- 11 ping ubuntu
- 12 ansible --version
- 13 sudo dnf install git -y
- 14 git clone https://github.com/sandervanvugt/ansibleinthreeweeks
- 15 cd ansibleinthreeweeks/
- 16 ls
- 17 git pull
- 18 ./countdown 12
- 19 sudo sh -c "echo password | passwd --stdin ansible"
- 20 echo ansible ALL=(ALL) NOPASSWD: ALL >/tmp/sudoers
- 21 echo "ansible ALL=(ALL) NOPASSWD: ALL" >/tmp/sudoers
- 22 cd ..
- 23 cat inventory
- 24 ansible rocky -i inventory -u root -k -m raw -a "useradd -G wheel ansible"
- 25 ssh root@rocky
- 26 ansible rocky -i inventory -u root -k -m raw -a "useradd -G wheel ansible"
- 27 ansible rocky -i inventory -u root -k -m command -a "id"
- 28 ansible rocky -i inventory -u root -k -m command -a "id ansible"
- 29 history
- 30 ansible rocky -i inventory -u root -k -m shell -a "echo password | passwd --stdin ansible"
- 31 ssh ansible@rocky
- 32 ansible rocky -i inventory -u root -k -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
- 33 ansible rocky -u ansible -k -i inventory -m command -a "ls -l /root"
- 34 ansible rocky -u ansible -k -i inventory -b -m command -a "ls -l /root"
- 35 ssh-keygen
- 36 ssh-copy-id rocky
- 37 ansible rocky -u ansible -i inventory -b -m command -a "ls -l /root"
- 38 history
- 39 #ansible ubuntu -i inventory -u student -k -b -K -m command -a "useradd -G sudo ansible"
- 40 ssh student@ubuntu
- 41 #ansible ubuntu -i inventory -u student -k -b -K -m command -a "useradd -m -G sudo ansible"
- 42 ansible ubuntu -i inventory -u student -k -b -K -m command -a "useradd -m -G sudo ansible"
- 43 ansible ubuntu -i inventory -u ansible -k -b -K -m command -a "ls /root"
- 44 ansible ubuntu -i inventory -u student -k -b -K -m shell -a "echo ansible:password | chpasswd"
- 45 ansible ubuntu -i inventory -u ansible -k -b -K -m command -a "ls /root"
- 46 ansible ubuntu -i inventory -u ansible -k -b -K -m command -a "ls -a /root"
- 47 ssh-copy-id ubuntu
- 48 ansible ubuntu -i inventory -u ansible -b -K -m command -a "ls -a /root"
- 49 ansible ubuntu -i inventory -u ansible -b -K -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
- 50 ansible ubuntu -i inventory -u ansible -m command -a "ls -a /root"
- 51 ansible ubuntu -i inventory -u ansible -b -m command -a "ls -a /root"
- 52 history
- 53 cd ansibleinthreeweeks/
- 54 ls
- 55 cd basics/
- 56 ls
- 57 cd ..
- 58 vim ansible.cfg
- 59 vim inventory
- 60 ansible all -m command -a "ls -a /root"
- 61 ansible-doc -l | wc
- 62 ansible-doc -l
- 63 ansible all -m ping
- 64 ansible all -m user -a "name=lisa"
- 65 ansible all -m command -a "useradd lisa"
- 66 ansible all -m command -a "id lisa"
- 67 ansible all -m user -a "name=lisa state=absent"
- 68 ansible all -m command -a "id lisa"
- 69 ansible-doc user
- 70 ansible rocky -m command -a "rpm -qa | grep python"
- 71 ansible rocky -m shell -a "rpm -qa | grep python"
- 72 ansible all -m copy -a 'content="hello world" dest=/tmp/testfile'
- 73 ansible all -a "cat /tmp/testfile"
- 74 ansible all -m package -a "name=nmap state=latest"
- 75 ansible all -m service -a "name=httpd state=started enabled=yes"
- 76 history
- 77 cat ansible.cfg
- 78 ls
- 79 cd basics/
- 80 ls
- 81 cp ../ansible.cfg .
- 82 cp ../inventory .
- 83 ls
- 84 vim install_and_start_httpt.yaml
- 85 ansible-playbook install_and_start_httpt.yaml
- 86 vim install_and_start_httpt.yaml
- 87 ../countdown 18
- 88 vim install_and_start_httpt.yaml
- 89 ansible-playbook install_and_start_httpt.yaml
- 90 ansible-playbook install_and_start_httpt.yaml -vvvv
- 91 ls
- 92 vim run_and_test_httpd.yaml
- 93 ansible-playbook run_and_test_httpd.yaml
- 94 ansible-doc -l | grep ufw
- 95 cat ansible.cfg
- 96 vim run_and_test_httpd.yaml
- 97 ansible-playbook run_and_test_httpd.yaml
- 98 vim variables_example.yaml
- 99 ansible-playbook variables_example.yaml
- 100 ansible-playbook variables_example.yaml -e user=anna
- 101 ansible ubuntu -m setup > ubuntu_facts.txt
- 102 less ubuntu_facts.txt
- 103 vim gather_facts.yaml
- 104 ansible-playbook gather_facts.yaml
- 105 vim old_facts.yaml
- 106 vim new_facts.yaml
- 107 ansible-playbook new_facts.yaml
- 108 vim new_facts.yaml
- 109 ansible-playbook new_facts.yaml
- 110 ls
- 111 cat new_facts.yaml
- 112 vim myvars.yaml
- 113 vim vars_file.yaml
- 114 ansible-playbook myvars.yaml
- 115 vim vars_file.yaml
- 116 vim myvars.yaml
- 117 ansible-playbook myvars.yaml
- 118 cat myvars.yaml
- 119 cat vars_file.yaml
- 120 mv myvars.yaml myvars
- 121 vimn vars_file.yaml
- 122 vim vars_file.yaml
- 123 ansible-playbook myvars.yaml
- 124 ansible-playbook vars_file.yaml
- 125 ip a
- 126 cat /etc/hosts
- 127 history
- 128 ansible all -a "poweroff"
- 129 sudo poweroff
- 130 cd ansibleinthreeweeks/
- 131 ./countdown 13
- 132 history
- 133 history | grep git
- 134 ls
- 135 cd ansibleinthreeweeks/
- 136 ls
- 137 cd basics/
- 138 ls
- 139 ip a
- 140 sudo poweroff
- 141 history
- 142 cd ansibleinthreeweeks/
- 143 ls
- 144 ansible localhost -m debug -a 'var=hostvars["localhost"]'
- 145 find . -name "register.yaml"
- 146 vim register.yaml
- 147 ansible-playbook register.yaml
- 148 vim register.yaml
- 149 ls
- 150 vim secret.yml
- 151 rm secret.yml
- 152 ansible-vault --help
- 153 ansible-vault create secret.yml
- 154 vim create-user.yml
- 155 ansible-playbook create-user.yml
- 156 ansible-playbook --ask-vault-pass create-user.yml
- 157 ansible all -a "tail /etc/shadow"
- 158 echo password > vault-pass
- 159 ansible-playbook --vault-password-file=vault-pass create-users.yml
- 160 ansible-playbook --vault-password-file=vault-pass create-user.yml
- 161 sudo dnf install -y redis
- 162 sudo systemctl enable --now redis
- 163 sudo systemctl status redis
- 164 sudo pip3 install redis
- 165 ls
- 166 git pull
- 167 ls
- 168 cd ..
- 169 ls
- 170 mv ansibleinthreeweeks ansibleinthreeweeks.old
- 171 git clone https://github.com/sandervanvugt/ansibleinthreeweeks
- 172 cd ansibleinthreeweeks
- 173 ls
- 174 cd factcache/
- 175 ls
- 176 vim ansible.cfg
- 177 vim checkcache.py
- 178 ./checkcache.py
- 179 ansible all -m setup
- 180 vim inventory
- 181 ansible all -m setup
- 182 ./checkcache.py
- 183 vim checkfacts.yaml
- 184 ansible-playbook checkfacts.yaml
- 185 sudo crontab -e
- 186 crontab -e
- 187 cd ..
- 188 ls
- 189 cd templates/
- 190 ls
- 191 cp ../factcache/ansible.cfg .
- 192 cp ../factcache/inventory .
- 193 vim vsftpd.j2
- 194 vim vsftpd-template.yml
- 195 ansible-playbook vsftpd-template.yml
- 196 ansible rocky -a "cat /etc/vsftpd/vsftpd.conf"
- 197 vim vsftpd-template.yml
- 198 cd ..
- 199 ls
- 200 cd task_control/
- 201 ls
- 202 vim handlers.yml
- 203 ansible-playbook handlers.yml
- 204 ls
- 205 cp ../factcache/ansible.cfg .
- 206 cp ../factcache/inventory .
- 207 vim handlers.yml
- 208 ansible-playbook handlers.yml
- 209 touch /tmp/index.html
- 210 ansible-playbook handlers.yml
- 211 vim handlers.yml
- 212 ansible-playbook handlers.yml
- 213 ansible rocky -m file -a "name=/var/www/html/index.html state=absent"
- 214 ansible-playbook handlers.yml
- 215 cd ..
- 216 ls
- 217 ./countdown 12
- 218 ls
- 219 cd task_control/
- 220 ls
- 221 vim loopservices.yml
- 222 rpm -qf $(which crond)
- 223 rpm -qf $(which sshd)
- 224 vim loopservices.yml
- 225 ansible-playbook loopservices.yml
- 226 vim loopservices.yml
- 227 ansible-doc service
- 228 ansible-doc yum
- 229 ansible-doc package
- 230 ls
- 231 vim ifsize.yml
- 232 vim when_multiple.yml
- 233 sudo vim /etc/hosts
- 234 vim inventory
- 235 vim ../factcache/inventory
- 236 vim when_multiple.yml
- 237 ansible-playbook when_multiple.yml
- 238 ansible all -m setup
- 239 ssh-copy-id ansible@tower
- 240 ansible all -m setup
- 241 ansible tower -m setup
- 242 ansible-playbook when_multiple.yml
- 243 vim when_multiple.yml
- 244 ls
- 245 vim ifsize.yml
- 246 ansible-playbook ifsize.yml
- 247 cd ..
- 248 ls
- 249 ansible --version
- 250 ansible-galaxy install geerlingguy.nginx
- 251 cd
- 252 cd .ansible/roles/geerlingguy.nginx/
- 253 ls
- 254 cd tasks/
- 255 ls
- 256 vim main.yml
- 257 cd
- 258 cd ansibleinthreeweeks
- 259 ls
- 260 cd roles/
- 261 ls
- 262 vim nginx-role.yml
- 263 cp ../factcache/inventory .
- 264 cp ../factcache/ansible.cfg .
- 265 ansible-playbook nginx-role.yml
- 266 ls
- 267 vim pretasks.yml
- 268 vim ../../.ansible/roles/geerlingguy.nginx/tasks/main.yml
- 269 ansible ubuntu -m setup -a "filter=ansible_os_family"
- 270 pwd
- 271 ../countdown 12
- 272 ansible-galaxy --help
- 273 ansible-galaxy collection -l
- 274 ansible-galaxy collection
- 275 ansible-galaxy collection list
- 276 ansible-doc -l
- 277 ansible-doc --help
- 278 cd
- 279 cd ansibleinthreeweeks
- 280 git pull
- 281 vim listing731.yaml
- 282 vim inventory
- 283 cp factcache/ansible.cfg .
- 284 vim listing731.yaml
- 285 ansible-playbook listing731.yaml
- 286 sudo vim /etc/ansible/ansible.cfg
- 287 ./countdown 18
- 288 ls
- 289 cd filters/
- 290 ls
- 291 vim int-filter.yaml
- 292 cp int-filter.yaml int-filter-wring.yaml
- 293 vim int-filter-wring.yaml
- 294 ansible-playbook int-filter-wring.yaml
- 295 ls
- 296 vim int-filter.yaml
- 297 ansible-playbook int-filter.yaml
- 298 vim ansible.cfg
- 299 vim int-filter.yaml
- 300 sudo ls /
- 301 ansible-playbook int-filter.yaml -K
- 302 cp ../factcache/ansible.cfg .
- 303 cp ../factcache/inventory .
- 304 vim storage-filter.yaml
- 305 ansible-playbook storage-filter.yaml
- 306 vim storage-filter.yaml
- 307 ansible all -m setup
- 308 ansible-playbook storage-filter.yaml
- 309 ansible-playbook storage-filter.yaml --flush-cache
- 310 ssh root@tower
- 311 ansible-playbook storage-filter.yaml
- 312 ansible-playbook storage-filter.yaml --flush-cache
- 313 ansible all -m setup
- 314 ansible-playbook storage-filter.yaml --flush-cache
- 315 vim ansible.cfg
- 316 vim storage-filter.yaml
- 317 ansible-playbook storage-filter.yaml
- 318 vim storage-filter.yaml
- 319 vim ansible.cfg
- 320 ansible all -m setup
- 321 ansible-playbook storage-filter.yaml
- 322 vim assert_filter.yaml
- 323 ansible-playbook assert_filter.yaml
- 324 vim assert_filter.yaml
- 325 ansible-playbook assert_filter.yaml
- 326 vim assert_filter.yaml
- 327 ansible-playbook assert_filter.yaml
- 328 ls
- 329 vim password_hash.yaml
- 330 ansible-playbook password_hash.yaml
- 331 ../countdown 12
- 332 ls
- 333 cd ..
- 334 find . -name "readkeys.*"
- 335 cd plugins/
- 336 vim readkeys.yaml
- 337 ansible doc -t lookup -l
- 338 ansible-doc -t lookup -l
- 339 ls
- 340 vim hello.yml
- 341 ansible-doc -t callback -l
- 342 ls
- 343 vim ansible.cfg
- 344 ansible-playbook hello.yml
- 345 vim hello.yml
- 346 find ../ -name "mytempl*"
- 347 cp ../templates/mytemplate.j2 .
- 348 ansible-playbook hello.yml -K
- 349 sudo vim /etc/ansible/ansible.cfg
- 350 cd ..
- 351 cat windows/inventory
- 352 ansible-inventory --yaml -i windows/inventory --list --output winventroy.yaml
- 353 ls
- 354 vim winventroy.yaml
- 355 ansible-doc -t inventory -l
- 356 ansible-doc -t inventory nmap
- 357 ansible-doc -t inventory -l
- 358 history
- 359 sudo poweroff
- 360 echo $(( 3600 * 5 ))
- 361 ssh [email protected]
- 362 ansible-doc file
- 363 ssh root@kubuntu
- 364 ssh ansible@kubuntu
- 365 cd ..
- 366 ls
- 367 git pull
- 368 cd provision-kvm/
- 369 ls
- 370 cd ..
- 371 ./countdown 12
- 372 sudo pip3 install 'ansible[azure]'
- 373 cd azure/
- 374 ls
- 375 vim create-azure-stuff-old.yaml
- 376 ansible-playbook create-azure-stuff-old.yaml
- 377 vim create-azure-stuff-old.yaml
- 378 ansible-playbook create-azure-stuff-old.yaml
- 379 ansible-playbook remove-azure-stuff-old.yaml
- 380 cd ../
- 381 ls
- 382 cd docker/
- 383 ls
- 384 vim podman.yaml
- 385 ansible-playbook podman.yaml
- 386 ansible-playbook podman.yaml -K
- 387 ansible rocky -a "podman ps -a"
- 388 ip a
- 389 sudo pip3 install python-boto
- 390 sudo pip3 install boto boto3
- 391 cd ../ec2
- 392 ls
- 393 vim list-instances.yml
- 394 ansible-playbook --ask-vault-pass list-instances.yml
- 395 ls
- 396 ansible-playbook --ask-vault-pass ubuntu-new.yaml
- 397 history
Advertisement
Add Comment
Please, Sign In to add comment