Advertisement
sandervanvugt

RHCE day1 nov22

Nov 14th, 2022
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.64 KB | None | 0 0
  1. [root@localhost ~]# history
  2. 1 cd rhce8-live/
  3. 2 ./countdown 12
  4. 3 ip a
  5. 4 ping 192.168.29.145
  6. 5 ping 192.168.29.146
  7. 6 vim /etc/hosts
  8. 7 dnf install -y git
  9. 8 git clone https://github.com/sandervanvugt/rhce8-live
  10. 9 git clone https://github.com/sandervanvugt/rhce8-book
  11. 10 git clone https://github.com/sandervanvugt/rhce8
  12. 11 yum search ansible
  13. 12 cd rhce8-live/
  14. 13 ./countdown 2
  15. 14 dnf install ansible-core
  16. 15 cd ..
  17. 16 history
  18. 17 cat /etc/hosts
  19. 18 vim inventory
  20. 19 ansible --version
  21. 20 ansible -i inventory -u root -k -m command -a "useradd ansible"
  22. 21 ansible -i inventory all -u root -k -m command -a "useradd ansible"
  23. 22 ssh ansible1
  24. 23 ssh ansible2
  25. 24 ansible -i inventory all -u root -k -m command -a "useradd ansible"
  26. 25 history
  27. 26 echo password | passwd --stdin ansible
  28. 27 ansible -i inventory all -u root -k -m shell -a "echo password | passwd --stdin ansible"
  29. 28 ssh ansible@ansible1
  30. 29 exit
  31. 30 history
  32. 31 ecit
  33. 32 history
  34. 33 exit
  35. 34 history
  36. [root@localhost ~]# exit
  37. logout
  38. [ansible@localhost lesson5]$ history
  39. 1 sudo -i
  40. 2 ssh-keygen
  41. 3 ssh-copy-id ansible1
  42. 4 ssh-copy-id ansible2
  43. 5 ansible -i inventory all -m command -a "id"
  44. 6 vim inventory
  45. 7 ansible -i inventory all -m command -a "id"
  46. 8 ansible -i inventory all -m command -a "ls -l /root"
  47. 9 ls -l /root
  48. 10 sudo ls -l /root
  49. 11 ansible -i inventory all -b -K -m command -a "ls -l /root"
  50. 12 sudo visudo
  51. 13 #%wheel ALL=(ALL) NOPASSWD: ALL
  52. 14 #ansible -i inventory all -u root -k -m copy -a "content='ansible ALL=(ALL) NOPASSWD: ALL' dest=/etc/sudoers.d/ansible"
  53. 15 ansible-doc copy
  54. 16 ansible -i inventory all -u root -k -m copy -a "content='ansible ALL=(ALL) NOPASSWD: ALL' dest=/etc/sudoers.d/ansible"
  55. 17 history
  56. 18 ansible -i inventory all -b -m command -a "ls -l /root"
  57. 19 sudo -i
  58. 20 history
  59. 21 sudo vim /etc/ansible/hosts
  60. 22 ansible -i inventory all --list-hosts
  61. 23 ansible -i inventory all -u ansible -b -k -K -m command -a "ls -l /root"
  62. 24 ls
  63. 25 sudo git clone https://github.com/sandervanvugt/rhce8-live
  64. 26 cd rhce8-live/
  65. 27 ls
  66. 28 ./countdown 3
  67. 29 vim inventory
  68. 30 ls -ld .
  69. 31 cd ..
  70. 32 sudo chmod -R ansible:ansible rhce8-live/
  71. 33 sudo chown -R ansible:ansible rhce8-live/
  72. 34 cd rhce8-live/
  73. 35 touch f
  74. 36 vim inventory
  75. 37 ansible all -i inventory all --list-hosts
  76. 38 ansible -i inventory all --list-hosts
  77. 39 ansible -i inventory ungrouped --list-hosts
  78. 40 ansible -i inventory file --list-hosts
  79. 41 ls
  80. 42 cd lesson2/
  81. 43 vim ansible.cfg
  82. 44 ansible --version
  83. 45 cd ..
  84. 46 ansible --version
  85. 47 cat /etc/ansible/ansible.cfg
  86. 48 ./countdown 12
  87. 49 cd lesson2/
  88. 50 ansible all -m command -a "useradd lisa"
  89. 51 vim inventory
  90. 52 ansible all -m command -a "useradd lisa"
  91. 53 ansible all -m user -a "name=lisa"
  92. 54 ansible-doc -l
  93. 55 ansible-doc yum
  94. 56 ansible ansible1 -m command -a "rpm -qa | grep bash"
  95. 57 vim inventory
  96. 58 ansible ansible1 -m command -a "rpm -qa | grep bash"
  97. 59 ansible ansible1 -m shell -a "rpm -qa | grep bash"
  98. 60 ansible all -m user -a "name=lisa"
  99. 61 ansible all -m command -a "id lisa"
  100. 62 ansible all -m ping
  101. 63 ansible all -m copy -a 'content="hello workd" dest=/tmp/hello'
  102. 64 ../countdown 4
  103. 65 cd ../lesson3
  104. 66 cd ../lesson4
  105. 67 ls
  106. 68 vim test.yaml
  107. 69 ansible-playbook test.yaml
  108. 70 vim test.yaml
  109. 71 ansible-playbook test.yaml
  110. 72 ls
  111. 73 vim vsftpd.yml
  112. 74 ansible-playbook vsftpd.yml
  113. 75 vim vsftpd.yml
  114. 76 ansible-playbook vsftpd.yml
  115. 77 cat test.yaml
  116. 78 vim vsftpd.yml
  117. 79 sudo dnf provides */ansible-lint
  118. 80 ../countdown 16
  119. 81 vim lg-undo.yaml
  120. 82 ansible-playbook lg-undo.yaml
  121. 83 vim lg-undo.yaml
  122. 84 cp lg-undo.yaml lg-do.yaml
  123. 85 vim lg-do.yaml
  124. 86 ansible-playbook lg-do.yaml
  125. 87 ansible-playbook lg-undo.yaml
  126. 88 cd ../lesson5/
  127. 89 ls
  128. 90 vim user.yml
  129. 91 ansible-playbook user.yml
  130. 92 vim user.yml
  131. 93 ansible-playbook user.yml
  132. 94 ansible-playbook user.yml -e user=linda
  133. 95 vim user.yml
  134. 96 ansible-playbook user.yml -e user=linda
  135. 97 vim set-fact.yaml
  136. 98 ansible-playbook set-fact.yaml
  137. 99 ansible-playbook set-fact.yaml -K
  138. 100 vim ansible.cfg
  139. 101 vim set-fact.yaml
  140. 102 ansible-playbook set-fact.yaml
  141. 103 history
  142. 104 sudo -i
  143. 105 history
  144.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement