sandervanvugt

automating with ansible sep20

Sep 16th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.90 KB | None | 0 0
  1. [ansible@control lesson9]$ history
  2. 1 sudo vim /etc/hosts
  3. 2 ssh-keygen
  4. 3 ssh-copy-id ansible1
  5. 4 ssh-copy-id ansible2
  6. 5 history
  7. 6 ssh ansible1
  8. 7 sudo yum install -y ansible
  9. 8 sudo yum install -y epel-release
  10. 9 sudo yum install -y ansible
  11. 10 ansible all -m setup
  12. 11 git clone https://github.com/sandervanvugt/ansible-advanced
  13. 12 git clone https://github.com/sandervanvugt/rhce8-live
  14. 13 cd ansible-advanced/
  15. 14 ls
  16. 15 cd lab/
  17. 16 ls
  18. 17 vim ansible.cfg
  19. 18 ansible all -m setup
  20. 19 history
  21. 20 vim ansible.cfg
  22. 21 vim lab-inventory
  23. 22 ansible all -m setup | less
  24. 23 vim custom.fact
  25. 24 vim lab-copy-facts.yml
  26. 25 ansible-playbook lab-copy-facts.yml
  27. 26 ls
  28. 27 vim lab-copy-facts.yml
  29. 28 ansible all -m setup | less
  30. 29 ansible all -m setup -a 'filter=ansible_local*'
  31. 30 vim lab-vars/allvars.yml
  32. 31 vim lab-tasks/lamp.yml
  33. 32 vim lab-tasks/file.yml
  34. 33 vim lab-playbook.yml
  35. 34 ansible-playbook lab-playbook.yml
  36. 35 ansible lamp -a 'systemctl status mariadb'
  37. 36 ansible file -a 'systemctl status vsftpd'
  38. 37 ansible-doc -l
  39. 38 ansible-doc -l | grep vmw
  40. 39 ansible-doc -l | grep vmw | less
  41. 40 ansible-doc -l | wc
  42. 41 ../countdown 12
  43. 42 ls
  44. 43 vim lab-playbook.yml
  45. 44 cd ..
  46. 45 cd windows/
  47. 46 ls
  48. 47 vim ansible.cfg
  49. 48 cat inventory
  50. 49 sudo vim /etc/ansible/ansible.cfg
  51. 50 cd ..
  52. 51 ls
  53. 52 cd ansible-advanced/
  54. 53 ls
  55. 54 cd ..
  56. 55 cd advanced/
  57. 56 ls
  58. 57 cd ..
  59. 58 pwd
  60. 59 cd ..
  61. 60 ls
  62. 61 cd rhce8-live/
  63. 62 ls
  64. 63 cd lesson9/
  65. 64 ls
  66. 65 cd ../lesson11/
  67. 66 ls
  68. 67 vim nginx-role.yml
  69. 68 ansible-galaxy install geerlingguy.nginx
  70. 69 cd ~/.ansible/roles/geerlingguy.nginx/
  71. 70 ansible localhost -m yum -a "name=tree state=present"
  72. 71 sudo yum install -y tree
  73. 72 ansible --help | less
  74. 73 pwd
  75. 74 tree
  76. 75 vim tasks/main.yml
  77. 76 cd
  78. 77 cd rhce8-live/lesson11/
  79. 78 ls
  80. 79 vim nginx-role.yml
  81. 80 ansible-playbook nginx-role.yml
  82. 81 ansible-doc -l | grep nginx
  83. 82 ansible-doc nginx_status_info
  84. 83 cd ../../ansible-advanced/
  85. 84 cd advanced/
  86. 85 ls
  87. 86 vim un-handlers.yml
  88. 87 ansible-playbook un-handlers.yml -e nginx
  89. 88 ansible-playbook un-handlers.yml -e webservice=nginx
  90. 89 vim un-handlers.yml
  91. 90 ansible-playbook un-handlers.yml -e webservice=nginx
  92. 91 ansible-playbook un-handlers.yml -e webservice=httpd
  93. 92 vim force-handlers.yml
  94. 93 ansible-playbook force-handlers.yml
  95. 94 touch /tmp/index.html
  96. 95 ansible-playbook force-handlers.yml
  97. 96 vim force-handlers.yml
  98. 97 ansible-playbook force-handlers.yml
  99. 98 ansible all -m file -a "name=/var/www/html/index.html state=absent"
  100. 99 ansible-playbook force-handlers.yml
  101. 100 grep loop *
  102. 101 cd ..
  103. 102 grep -R loop *
  104. 103 cd ../rhce8-live/
  105. 104 grep -R loop *
  106. 105 vim lesson16/setup_users.yml
  107. 106 cd ../ansible-advanced/
  108. 107 ls
  109. 108 cd handlers/
  110. 109 ls
  111. 110 cd ..
  112. 111 git clone https://github.com/sandervanvugt/ansible-3h
  113. 112 cd ansible-3h/
  114. 113 ls
  115. 114 cd loops/
  116. 115 ls
  117. 116 cd ..
  118. 117 grep -R loop *
  119. 118 grep -R item *
  120. 119 cd loops/
  121. 120 vim with_nested
  122. 121 vim with_nested.yml
  123. 122 ansible-playbook with_nested.yml
  124. 123 ansible all -m setup -a "filter=ansible_mounts"
  125. 124 ls
  126. 125 vim ifsize.yml
  127. 126 ansible-playbook ifsize.yml
  128. 127 vim ifsize.yml
  129. 128 ansible-playbook ifsize.yml
  130. 129 vim ifsize.yml
  131. 130 ansible-playbook ifsize.yml
  132. 131 pwd
  133. 132 ../../ansible-advanced/countdown 12
  134. 133 cd ..
  135. 134 cd ../ansible-advanced/
  136. 135 find . -name "docker_main.yaml"
  137. 136 vim docker_main.yaml
  138. 137 ls
  139. 138 vim docker.yaml
  140. 139 ansible-doc -l | grep asus
  141. 140 ansible-doc -l | grep cisco
  142. 141 ansible-doc -l | grep ios
  143. 142 pwd
  144. 143 cd windows/
  145. 144 ls
  146. 145 sudo vim /etc/hosts
  147. 146 sudo pip3 install pywinrm
  148. 147 export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3.6/site-packages/winrm
  149. 148 vim ansible.cfg
  150. 149 vim inventory
  151. 150 ansible win -i inventory -m win_ping
  152. 151 vim playbook.yml
  153. 152 ansible-playbook playbook.yml
  154. 153 ansible-doc -l | grep win
  155. 154 ansible-doc -l | grep win | less
  156. 155 cd ../ec2/
  157. 156 ls
  158. 157 vim ec2.ini
  159. 158 vim ubuntu.yaml
  160. 159 vim list-instances.yaml
  161. 160 cd ..
  162. 161 ls
  163. 162 cat pascal.py
  164. 163 ./pascal.py --list
  165. 164 vim pascal.py
  166. 165 ./pascal.py --list
  167. 166 vim pascal.py
  168. 167 ./pascal.py --list
  169. 168 ansible -i pascal.py ansible -m setup
  170. 169 ansible -i pascal.py ansible2 -m setup
  171. 170 ./countdown 12
  172. 171 ls
  173. 172 vim tags.yaml
  174. 173 ansible-playbook tags --list-tags
  175. 174 ansible-playbook tags.yaml --list-tags
  176. 175 ansible-playbook tags.yaml --list-tags -e newhost=ansible2.example.com
  177. 176 vim tags.yaml
  178. 177 ansible-playbook tags.yaml --list-tags -e newhost=ansible2.example.com
  179. 178 ansible-playbook tags.yaml --tags addhost -e newhost=ansible2
  180. 179 vim ansible.cfg
  181. 180 ansible all -a "id"
  182. 181 vim ansible.cfg
  183. 182 ls
  184. 183 cp ansible.cfg ansible-advanced/
  185. 184 cd ansible-advanced/
  186. 185 ls
  187. 186 cd ..
  188. 187 cp ansible.cfg advanced/
  189. 188 cd advanced/
  190. 189 ls
  191. 190 ansible-playbook un-handlers.yml
  192. 191 cd ..
  193. 192 ls
  194. 193 vim storage-filter.yaml
  195. 194 vim assert_filter.yaml
  196. 195 ansible-playbook assert_filter.yaml
  197. 196 vim assert_filter.yaml
  198. 197 ansible-playbook assert_filter.yaml
  199. 198 vim password_hash.yaml
  200. 199 ansible-playbook password_hash.yaml
  201. 200 ansible ansible2 -a "tail -n2 /etc/shadow"
  202. 201 sudo vim /etc/login.defs
  203. 202 cd ../rhce8-live/
  204. 203 cd lesson9/
  205. 204 ls
  206. 205 vim templates/vsftpd.j2
  207. 206 history
Add Comment
Please, Sign In to add comment