Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [defaults]
- inventory = inventory
- remote_user = ansible
- host_key_checking = false
- callback_whitelist = timer,profile_tasks,profile_roles
- [privilege_escalation]
- become = True
- become_method = sudo
- become_user = root
- become_ask_pass = False
- ******ROCKY
- [ansible@a3wrcontrol timer]$ history
- 1 ssh ansible@192.168.29.114
- 2 ip a
- 3 sudo yum install epel-release
- 4 sudo dnf install -y ansible
- 5 ansible --version
- 6 history
- 7 sudo vim /etc/ansible/hosts
- 8 sudo dnf install -y vim git
- 9 git clone https://github.com/sandervanvugt/ansibleinthreeweeks
- 10 cd ansibleinthreeweeks/
- 11 ls
- 12 cd cisco/
- 13 ls
- 14 cat inventory
- 15 cd ../windows/
- 16 cat inventory
- 17 ansible --version
- 18 cd
- 19 ansible --version
- 20 vim /etc/ansible/ansible.cfg
- 21 cd -
- 22 ansible --version
- 23 ansible-doc -l
- 24 ansible-doc -l | wc
- 25 cd..
- 26 cd ..
- 27 cd
- 28 ansible all -m ping
- 29 ssh-keygen
- 30 ssh-copy-id rocky
- 31 ssh-copy-id fedora
- 32 ssh-copy-id ubuntu
- 33 ssh-copy-id centos7
- 34 ssh-copy-id rhel8
- 35 ansible all -m ping
- 36 cat inventory
- 37 ansible rhelfamily -m command -a "useradd lisa"
- 38 ansible rhelfamily -m user -a "name=linda"
- 39 history
- 40 cat ansible.cfg
- 41 ansible ubuntu -K -m package -a "name=nmap"
- 42 cat /etc/hosts
- 43 ansible ubuntu -K -m package -a "name=nmap"
- 44 ssh-copy-id ubuntu
- 45 ansible ubuntu -K -m package -a "name=nmap"
- 46 history
- 47 git clone https://github.com/sandervanvugt/ansible-3h
- 48 cd ansible-3h/
- 49 ls
- 50 cd install/
- 51 ls
- 52 cd ../..
- 53 find . -name "install_and*"
- 54 cd ansible-3h/
- 55 cd install/
- 56 vim vsftpd.yml
- 57 ansible-playbook vsftpd.yml
- 58 ls
- 59 cat inventory
- 60 ansible-playbook -i ../../ansibleinthreeweeks/inventory vsftpd.yml
- 61 cp ../../ansibleinthreeweeks/inventory .
- 62 vim inventory
- 63 ansible-playbook vsftpd.yml
- 64 vim inventory
- 65 ansible-playbook vsftpd.yml
- 66 vim vsftpd.yml
- 67 ansible-playbook vsftpd.yml
- 68 cat vsftpd.yml
- 69 ansible-doc yum
- 70 ansible-doc copy
- 71 vim vsftpd.yml
- 72 ansible-playbook --syntax-check vsftpd.yml
- 73 ansible-playbook vsftpd.yml
- 74 ansible-playbook --syntax-check vsftpd.yml
- 75 vim vsftpd.yml
- 76 ansible-playbook --syntax-check vsftpd.yml -v
- 77 ansible-playbook --syntax-check vsftpd.yml -vv
- 78 ansible-playbook --syntax-check vsftpd.yml -vvv
- 79 ansible-playbook vsftpd.yml -vvv
- 80 ansible-playbook vsftpd.yml -vvvv
- 81 ansible-doc user
- 82 ansible-doc yum
- 83 ansible-doc -l | grep ufw
- 84 ansible-doc -l | grep firewall
- 85 ansible-doc ufw
- 86 cd ../..
- 87 find . -name "run_and_test_httpd.yaml"
- 88 ls
- 89 git clone https://github.com/sandervanvugt/ansible-advanced
- 90 find . -name "run_and_test_httpd.yaml"
- 91 cd ansible-3h/
- 92 cd base
- 93 ls
- 94 vim installpackage.yaml
- 95 ip a
- 96 cd..
- 97 cd ..
- 98 ;s
- 99 ls
- 100 cd ansible-3h/
- 101 cd base/
- 102 ls
- 103 vim variables.yml
- 104 vim installpackage.yaml
- 105 ansible-playbook installpackage.yaml
- 106 vim inventory
- 107 ansible-playbook installpackage.yaml
- 108 vim inventory
- 109 cat installpackage.yaml
- 110 ansible-playbook --help | less
- 111 ansible-playbook installpackage.yaml -e package=nmap
- 112 ls
- 113 vim variables.yml
- 114 ansible-playbook variables.yml
- 115 vim variables.yml
- 116 ansible centos7 -m setup | less
- 117 ls
- 118 head installpackage.yaml
- 119 head variables.yml
- 120 ansible-doc -l | grep facts
- 121 ansible-doc -l | grep facts | wc
- 122 ls
- 123 vim thefacts.yaml
- 124 ansible-playbook thefacts.yaml
- 125 vim thefacts.yaml
- 126 ansible-playbook thefacts.yaml
- 127 ls
- 128 vim when-test.yml
- 129 ansible-playbook when-test.yml
- 130 vim when-test.yml
- 131 vim inventory
- 132 vim when-test.yml
- 133 ansible-playbook when-test.yml
- 134 vim when-test.yml
- 135 ansible-playbook when-test.yml
- 136 history
- 137 cd
- 138 vim paster
- 139 vim .bashrc
- 140 history -d 135
- 141 history -d 137
- 142 history -d 138
- 143 ls
- 144 chmod +x paster
- 145 history
- 146 history -d 134
- 147 history -d 135
- 148 history -d 140-
- 149 history -d 140-144
- 150 history -d 140
- 151 hist
- 152 history -d 134
- 153 history
- 154 history -d 138
- 155 history -d 137
- 156 history
- 157 chmod +x paster
- 158 ./paster
- 159 vim .bashrc
- 160 source .bashrc
- 161 ./paster
- 162 ./paster test
- 163 vim paster
- 164 ./paster "my-title" "$(history)"
- 165 sudo poweroff
- 166 history
- 167 ls
- 168 cd ansibleinthreeweeks/
- 169 ls
- 170 cat inventory
- 171 ansible localhost -m debug -a 'var=hostvars["fedora"]'
- 172 ls
- 173 cd ..
- 174 git pull https://github.com/sandervanvugt/ansibleinthreeweeks
- 175 git clone https://github.com/sandervanvugt/ansibleinthreeweeks
- 176 rm -rf ansibleinthreeweeks/
- 177 git clone https://github.com/sandervanvugt/ansibleinthreeweeks
- 178 cd ansibleinthreeweeks/
- 179 ls
- 180 vim register.yaml
- 181 ansible-playbook register.yaml
- 182 vim inventory
- 183 ansible-playbook register.yaml
- 184 ls
- 185 cat secret.yml
- 186 rm secret.yml
- 187 ansible-vault -h
- 188 ansible-vault create secret.yml
- 189 vim create-user.yml
- 190 ansible-playbook create-user.yml
- 191 ansible-playbook --ask-vault-pass create-user.yml
- 192 ansible fedora -a "cat /etc/shadow"
- 193 echo password > vault-pass
- 194 ansible-playbook --vault-password-file=vault-pass create-users.yml
- 195 ansible-playbook --vault-password-file=vault-pass create-user.yml
- 196 ls
- 197 cd templates/
- 198 ls
- 199 cp ../inventory .
- 200 cp ../ansible.cfg .
- 201 vim vsftpd-template.yml
- 202 vim vsftpd.j2
- 203 ansible-playbook vsftpd-template.yml
- 204 cat /etc/hosts
- 205 cd
- 206 cd ansibleinthreeweeks/
- 207 ls
- 208 vim exercise134.yaml
- 209 ansible-playbook --list-tags exercise134.yaml
- 210 cd ..
- 211 git clone https://github.com/sandervanvugt/rhce8-book
- 212 cd -
- 213 cp ../rhce8-book/*134* .
- 214 ls
- 215 ansible-playbook --list-tags exercise134.yaml
- 216 ansible-playbook --tags setuplocal exercise134.yaml
- 217 vim exercise134.yaml
- 218 vim exercise134-tasks.yaml
- 219 vim exercise134.yaml
- 220 ansible all -m setup
- 221 cd templates/; ansible-playbook -vvv vsftpd-template.yml
- 222 cd ..
- 223 ../luth/countdown 12
- 224 ls
- 225 mkdir perf
- 226 cd perf
- 227 cp ../inventory .
- 228 cp ../ansible.cfg
- 229 cp ../ansible.cfg .
- 230 vim ansible.cfg
- 231 sudo cgcreate -a ansible:ansible -t ansible:ansible -g cpuacct,memory,pids:ansible_profile
- 232 sudo yum provides */cgcreate
- 233 sudo yum install libcgroup-tools
- 234 sudo cgcreate -a ansible:ansible -t ansible:ansible -g cpuacct,memory,pids:ansible_profile
- 235 ls ..
- 236 cd ../basics/
- 237 ls
- 238 cat install_and_start_httpt.yaml
- 239 cp ../perf/
- 240 cp install_and_start_httpt.yaml ../perf/
- 241 cd ../perf
- 242 #cgexec -g cpuacct,memory,pids:ansible_profile ansible-playbook
- 243 ls
- 244 cgexec -g cpuacct,memory,pids:ansible_profile ansible-playbook install_and_start_httpt.yaml
- 245 cd ../
- 246 mkdir timer
- 247 cp perf/* timer/
- 248 cd timer/
- 249 vim ansible.cfg
- 250 ls
- 251 ansible-playbook install_and_start_httpt.yaml
- 252 ansible-doc -t callback -l
- 253 cd ..
- 254 ls
- 255 cd filters/
- 256 ls
- 257 cp ../inventory .
- 258 cp ../ansible.cfg .
- 259 vim int-filter.yaml
- 260 cp int-filter.yaml int-nofilter.yaml
- 261 vim int-nofilter.yaml
- 262 ansible-playbook int-nofilter.yaml
- 263 vim int-filter.yaml
- 264 ansible-playbook int-filter.yaml
- 265 ls
- 266 vim password_hash.yaml
- 267 ansible-playbook password_hash.yaml
- 268 vim password_hash.yaml
- 269 ansible-playbook password_hash.yaml
- 270 ansible centos7 -a "tail /etc/shadow"
- 271 vim password_hash.yaml
- 272 vim assert_filter.yaml
- 273 ansible-playbook assert_filter.yaml
- 274 vim assert_filter.yaml
- 275 cd ../timer/
- 276 cat ansible.cfg
- 277 history
- ******FEDORA
- history
- [ansible@fedora basics]$
- [ansible@fedora basics]$
- [ansible@fedora basics]$ history
- 1 ssh rocky
- 2 sudo poweroff
- 3 ip a
- 4 sudo systemctl status sshd
- 5 sudo systemctl enable sshd
- 6 sudo dnf install python3-pip
- 7 pip3 install ansible --user
- 8 ansible --version
- 9 sudo systemctl enable sshd
- 10 sudo dnf install -y git vim
- 11 git clone https://github.com/sandervanvugt/ansibleinthreeweeks
- 12 cd ansibleinthreeweeks/
- 13 ls
- 14 cd ..
- 15 git clone https://github.com/sandervanvugt/luth
- 16 luth/countdown 12
- 17 sudo vim /etc/hosts
- 18 i pa
- 19 ip a
- 20 sudo vim /etc/hosts
- 21 ping ubuntu
- 22 vim inventory
- 23 #sudo useradd ansible
- 24 #passwd ansible
- 25 id
- 26 sudo ls -l /root
- 27 sudo -i
- 28 ansible all -i inventory -u root -k -m raw -a "useradd -G wheel ansible"
- 29 ansible all -i inventory -u root -k -m raw -a "useradd bob"
- 30 ansible ubuntu -i inventory -u ansible -k -K -m raw -a "useradd bob"
- 31 vim inventory
- 32 sudo /tmp/sudoers /etc/sudoers.d/ansible
- 33 sudo cp /tmp/sudoers /etc/sudoers.d/ansible
- 34 sudo ls -l /root
- 35 ssh-keygen
- 36 ssh-copy-id fedora
- 37 ssh-copy-id rocky
- 38 ssh-copy-id rhel8
- 39 ssh-copy-id centos7
- 40 ansible rocky,rhel8,centos7 -i inventory -u root -k -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
- 41 history
- 42 sudo systemctl status sshd
- 43 sudo systemctl enable --now sshd
- 44 ansible rhelfamily -i inventory -u root -k -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
- 45 vim inventory
- 46 ansible rhelfamily -i inventory -u root -k -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
- 47 ansible rhelfamily -u root -k -m copy -a "src=/tmp/sudoers dest=/etc/sudoers.d/ansible"
- 48 cat inventory
- 49 history
- 50 ansible centos7 -i inventory -u ansible -m command -a "id"
- 51 vim ansible.cfg
- 52 ansible centos7 -m command -a "id"
- 53 cat ansible.cfg
- 54 luth/countdown 12
- 55 cat ansible.cfg
- 56 cat inventory
- 57 sudo vim /etc/ansible/hosts
- 58 ls -a
- 59 cd .ansible/
- 60 ls
- 61 cd cp
- 62 ls
- 63 cd ../..
- 64 find / -name "hosts"
- 65 sudo find / -name "hosts" 2>/dev/null
- 66 history | grep '^ansible'
- 67 history
- 68 history | grep 'ansible'
- 69 cat /etc/hosts
- 70 history | grep ansible
- 71 history | grep copy
- 72 ansible rocky -m copy -a "src=/etc/hosts dest=/etc/hosts"
- 73 cat inventory
- 74 ansible rocky -m copy -a "src=inventory dest=/home/ansible"
- 75 ansible rocky -m copy -a "src=ansible.cfg dest=/home/ansible"
- 76 history
- 77 ansible-doc copy
- 78 luth/countdown 18
- 79 ls
- 80 luth/countdown 12
- 81 history
- 82 ansible-galaxy --help
- 83 ansible-galaxy collection install ansible.posix
- 84 tree .ansible/collections/ansible_collections/ansible/posix/
- 85 ansible-doc ansible.posix.selinux
- 86 ansible-doc --help | less
- 87 ansible-galaxy collection --help | less
- 88 ansible-galaxy collection list
- 89 ansible-doc ansible.windows
- 90 ansible-doc ansible.posix.acl
- 91 ls
- 92 rm -rf ansibleinthreeweeks/
- 93 git clone https://github.com/sandervanvugt/ansibleinthreeweeks
- 94 cd ansibleinthreeweeks/
- 95 ls
- 96 cd collections/
- 97 ls
- 98 vim enforce-selinux-simplified.yml
- 99 ansible-playbook enforce-selinux-simplified.yml
- 100 vim enforce-selinux.yml
- 101 cat enforce-selinux.yml
- 102 cat enforce-selinux-simplified.yml
- 103 cd
- 104 ls
- 105 luth/countdown 18
- 106 tree .ansible/collections/ansible_collections/ansible/posix/
- 107 tree .ansible/collections/ansible_collections/ansible/posix/ | less
- 108 ansible-galaxy collection install cisco.ios
- 109 ansible-doc -l | less
- 110 ansible-doc -l | grep '^ansible.posix'
- 111 cd ansibleinthreeweeks/
- 112 ls
- 113 cd basics/
- 114 ls
- 115 vim run_and_test_httpd.yaml
- 116 cp ../inventory .
- 117 cp ../ansible.cfg .
- 118 vim inventory
- 119 cat /etc/hosts
- 120 vim run_and_test_httpd.yaml
- 121 ansible-playbook run_and_test_httpd.yaml
- 122 vim httpd.yaml
- 123 vim run_and_test_httpd.yaml
- 124 ansible-doc -l | grep yum 2>/dev/null
- 125 history
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement