Advertisement
sandervanvugt

RHCE EX294 day1

Feb 13th, 2023
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.17 KB | None | 0 0
  1. [ansible@localhost facts]$ history
  2. 1 sudo subscription-manager register
  3. 2 sudo subscription-manager attach
  4. 3 sudo subscription-manager repos --list
  5. 4 sudo subscription-manager repos --enable ansible-automation-platform-2.2-for-rhel-9-x86_64-rpms
  6. 5 history
  7. 6 sudo dnf repolist
  8. 7 sudo dnf install ansible-navigator
  9. 8 ansible-navigator --version
  10. 9 podman login access.redhat.com
  11. 10 sudo cat /etc/containers/registries.conf
  12. 11 sudo cat /etc/containers/registries.conf | less
  13. 12 podman login registry.access.redhat.com
  14. 13 podman
  15. 14 sudo dnf install container-tools
  16. 15 sudo dnf install podman
  17. 16 ansible --version
  18. 17 ansible-navigator images
  19. 18 podman login registry.redhat.io
  20. 19 ansible-navigator images
  21. 20 history
  22. 21 vim setup-lab.txt
  23. 22 cat setup-lab.txt
  24. 23 history
  25. 24 ansible --version
  26. 25 ip a
  27. 26 sudo hostnamectl set-hostname control.example.com
  28. 27 sudo vim /etc/hosts
  29. 28 ls
  30. 29 cd rhce8-live/
  31. 30 ls
  32. 31 cd lesson2/
  33. 32 ls
  34. 33 vim inventory
  35. 34 ansible -i inventory all -u root -k -m command -a "useradd ansible"
  36. 35 ansible -i inventory all -u root -k -m user -a "name=ansible"
  37. 36 ansible -i inventory all -u root -k -m shell -a "echo password | passwd --stdin ansible"
  38. 37 ssh-keygen
  39. 38 for i in ansible1 ansible2; do ssh-copy-id $i; done
  40. 39 ssh ansible1
  41. 40 ansible -i inventory all -u ansible -b -m command -a "ls -l /root"
  42. 41 ansible -i inventory all -u ansible -b -m command -a "ls -l /root" -K
  43. 42 ansible -i inventory all -u root -k -m shell -a 'echo "ansible ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ansible'
  44. 43 ansible -i inventory all -u ansible -b -m command -a "ls -l /root"
  45. 44 history
  46. 45 ansible -i inventory all -u ansible -b -m command -a "ls -l /root"
  47. 46 sudo vim /etc/ansible/ansible.cfg
  48. 47 sudo ansible-config init --disabled > ansible.cfg
  49. 48 ls
  50. 49 cat ansible.cfg
  51. 50 mv ansible.cfg ansible.cfg.bak
  52. 51 vim ansible.cfg.bak
  53. 52 vim ansible.cfg
  54. 53 vim ansible.cfg.bak
  55. 54 vim ansible.cfg
  56. 55 vim ansible.cfg.bak
  57. 56 vim ansible.cfg
  58. 57 ansible all -u ansible -a "ls -l /root"
  59. 58 cat inventory
  60. 59 vim ansible.cfg
  61. 60 pwd
  62. 61 vim ansible.cfg
  63. 62 vim ansible.cfg.bak
  64. 63 vim ansible.cfg
  65. 64 ansible all -u ansible -a "ls -l /root"
  66. 65 ansible --version
  67. 66 vim ansible.cfg
  68. 67 ansible all -a "ls -l /root"
  69. 68 ansible all -m command -a "useradd linda"
  70. 69 ansible all -m user -a "name=linda"
  71. 70 ansible-doc -l | wc
  72. 71 ansible-doc -l
  73. 72 ls
  74. 73 cd ../lesson4
  75. 74 ls
  76. 75 ansible-galaxy -h | less
  77. 76 ansible-galaxy collection -h
  78. 77 ansible-galaxy collection install ansible.posix
  79. 78 ansible-doc -l
  80. 79 ../countdown 12
  81. 80 ls
  82. 81 vim vsftpd
  83. 82 vim vsftpd.yml
  84. 83 ansible-playbook vsftpd.yml
  85. 84 ansible-navigator -h | less
  86. 85 ansible-navigator run vsftpd.yml
  87. 86 ls
  88. 87 ansible-navigator run vsftpd-err.yml
  89. 88 vim vsftpd-err.yml
  90. 89 ls
  91. 90 vim vsftpd.yml
  92. 91 ansible-playbook vsftpd.yml
  93. 92 ansible-playbook --syntax-check vsftpd.yml
  94. 93 ansible-navigator run vsftpd.yml
  95. 94 ansible-playbook vsftpd.yml
  96. 95 vim vsftpd.yml
  97. 96 vim go.yml
  98. 97 ansible-playbook go.yml
  99. 98 cd ../lesson5/
  100. 99 ls
  101. 100 vim user.yml
  102. 101 ansible-playbook user.yml
  103. 102 vim user.yml
  104. 103 ansible-playbook user.yml
  105. 104 vim user.yml
  106. 105 ansible-playbook user.yml -e user=bob
  107. 106 history
  108. 107 grep vars_ *
  109. 108 ls
  110. 109 vim install_services.yml
  111. 110 cd webservers/
  112. 111 ls
  113. 112 vim site.yml
  114. 113 cat inventory
  115. 114 ls
  116. 115 ls group_vars/
  117. 116 cat group_vars/lamp
  118. 117 cat site.yml
  119. 118 ansible-playbook site.yml
  120. 119 ../../countdown 12
  121. 120 cd ..
  122. 121 ls
  123. 122 vim set-fact.yaml
  124. 123 ansible-navigator run set-fact.yaml
  125. 124 ansible-playbook set-fact.yaml
  126. 125 vim set-fact.yaml
  127. 126 ansible-playbook set-fact.yaml
  128. 127 ls
  129. 128 cd ..
  130. 129 ls
  131. 130 cd lesson7/
  132. 131 ls
  133. 132 cd ..
  134. 133 cd lesson5
  135. 134 vim promptme.yml
  136. 135 ansible-playbook promptme.yml
  137. 136 vim improvise.yml
  138. 137 vim newvars
  139. 138 ansible-playbook improvise.yml
  140. 139 vim newvars
  141. 140 vim improvise.yml
  142. 141 ansible-playbook improvise.yml
  143. 142 cat improvise.yml
  144. 143 cat newvars
  145. 144 ansible-navigator -h | less
  146. 145 cd ../lesson7/
  147. 146 ls
  148. 147 cd vault/
  149. 148 ls
  150. 149 ansible-vault -h | less
  151. 150 ansible-vault create secret.yml
  152. 151 vim create-user.yml
  153. 152 ansible-playbook create-user.yml
  154. 153 ansible-playbook --ask-vault-pass create-user.yml
  155. 154 ansible ansible2.example.com -a "tail /etc/shadow"
  156. 155 echo password > vault-pass
  157. 156 ansible-playbook --vault-password-file=vault-pass create-user.yml
  158. 157 ansible ansible2.example.com -m setup | less
  159. 158 cd ../facts/
  160. 159 ls
  161. 160 cat facts.yml
  162. 161 ansible-playbook facts.yml | less
  163. 162 cat ipfact.yml
  164. 163 vim ipfact.yml
  165. 164 ansible-playbook ipfact.yml
  166. 165 vim ipfact.yml
  167. 166 history
  168.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement