Advertisement
sandervanvugt

RHCE aug22 day1

Aug 29th, 2022
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.26 KB | None | 0 0
  1. [ansible@control lesson4]$ history
  2. 1 sudo dnf repolist
  3. 2 sudo -i
  4. 3 ssh root@ansible1
  5. 4 ssh root@ansible2
  6. 5 sudo dnf repolist
  7. 6 sudo dnf search ansible
  8. 7 sudo dnf install -y ansible-core
  9. 8 vim inventory
  10. 9 ansible -i inventory all -m command -a "useradd ansible"
  11. 10 ansible -i inventory all -m command -a "useradd ansible" -u root -k
  12. 11 history
  13. 12 ansible -i inventory all -m shell -a "echo password | passwd --stdin ansible" -u root -k
  14. 13 ssh ansible1
  15. 14 ansible-doc copy
  16. 15 ansible-doc copyhistory
  17. 16 history
  18. 17 ansible -i inventory all -m copy -a 'content="ansible ALL=(ALL) NOPASSWD: ALL" dest=/etc/sudoers.d/ansible'
  19. 18 ansible -i inventory all -m copy -a 'content="ansible ALL=(ALL) NOPASSWD: ALL" dest=/etc/sudoers.d/ansible' -u root -k
  20. 19 ansible -i inventory all -m command -a "ls -l /root" -k
  21. 20 ls -l /root
  22. 21 sudo ls -l /root
  23. 22 ansible -i inventory all -m command -a "ls -l /root" -k -b
  24. 23 history
  25. 24 ssh-keygen
  26. 25 ssh-copy-id ansible1
  27. 26 ssh-copy-id ansible2
  28. 27 ssh ansible1
  29. 28 ansible -i inventory all -m command -a "ls -l /root" -b
  30. 29 history
  31. 30 ansible version
  32. 31 ansible --version
  33. 32 sudo vim /etc/ansible/hosts
  34. 33 ansible -i inventory all --list-hosts
  35. 34 ansible file --list-hosts
  36. 35 ansible file --list-hosts -i inventory
  37. 36 vim inventory
  38. 37 ansible file --list-hosts -i inventory
  39. 38 vim inventory
  40. 39 ansible file --list-hosts -i inventory
  41. 40 ansible all --list-hosts -i inventory
  42. 41 vim inventory
  43. 42 ls
  44. 43 cd rhce8-live/
  45. 44 ./countdown 5
  46. 45 sudo vim /etc/ansible/ansible.cfg
  47. 46 ansible-config init --disabled > ~/ansible.cfg
  48. 47 vim ~/ansible.cfg
  49. 48 ls
  50. 49 cd lesson2/
  51. 50 ls
  52. 51 vim inventory
  53. 52 vim ansible.cfg
  54. 53 ansible --version
  55. 54 ../countdown 12
  56. 55 ansible-doc -l | less
  57. 56 ansible all -m command -a "rpm -qa | grep bash"
  58. 57 ansible all -m shell -a "rpm -qa | grep bash"
  59. 58 vim inventory
  60. 59 ansible ansible1 -m user -a "name=linda"
  61. 60 ansible ansible2 -m command -a "useradd linda"
  62. 61 ansible ansible2 -m user -a "name=linda"
  63. 62 ansible-doc user
  64. 63 ansible ansible2 -m user -a "name=linda state=absent"
  65. 64 ansible-doc -l | wc
  66. 65 ansible-doc -l
  67. 66 ansible-galaxy collection install azure.azcollection
  68. 67 ansible-doc -l | wc
  69. 68 ansible-doc -l
  70. 69 history
  71. 70 ansible-doc -l
  72. 71 ansible all -m package -a "name=nmap state=latest"
  73. 72 ansible all -m shell -a "rpm -qa | grep nmap"
  74. 73 ansible all -m shell -a "which nmap"
  75. 74 ../countdown 12
  76. 75 cd ../lesson4/
  77. 76 ls
  78. 77 vim test.yaml
  79. 78 ansible-playbook test.yaml
  80. 79 ansible ansible2 -a "cat /etc/sudoers.d/ansible"
  81. 80 vim inventory
  82. 81 ansible ansible2 -a "cat /etc/sudoers.d/ansible"
  83. 82 sudo vim /etc/sudoers.d/ansible
  84. 83 ansible-playbook test.yaml
  85. 84 sudo vim /etc/sudoers.d/ansible
  86. 85 vim test.yaml
  87. 86 ansible all -m copy -a "src=/etc/hosts dest=/etc/hosts"
  88. 87 ansible-playbook test.yaml
  89. 88 vim test.yaml
  90. 89 ansible-playbook test.yaml
  91. 90 history
  92. 91 cat test.yaml
  93. 92 vim vsftpd.yml
  94. 93 ansible-playbook vsftpd.yml
  95. 94 vim vsftpd.yml
  96. 95 ansible-doc service
  97. 96 vim vsftpd.yml
  98. 97 ansible all -m command -a "systemctl status vsftpd"
  99. 98 ansible-playbook vsftpd.yml
  100. 99 ansible all -m command -a "systemctl status vsftpd"
  101. 100 ls
  102. 101 vim uninstall-httpd.yml
  103. 102 ansible-doc yum
  104. 103 ansible-playbook --syntax-check vsftpd-err.yml
  105. 104 vim vsftpd-err.yml
  106. 105 ansible-playbook --syntax-check vsftpd-err.yml
  107. 106 vim vsftpd-err.yml
  108. 107 ansible-playbook --syntax-check vsftpd-err.yml
  109. 108 ansible-playbook vsftpd-err.yml
  110. 109 vim vsftpd-err.yml
  111. 110 ansible-playbook vsftpd-err.yml
  112. 111 ansible-playbook --syntax-check vsftpd-err.yml
  113. 112 ansible-playbook --check vsftpd-err.yml
  114. 113 ansible-playbook -v vsftpd.yml
  115. 114 ansible-playbook -vvvv vsftpd.yml
  116. 115 sudo yum install epel-release
  117. 116 sudo yum search epel
  118. 117 ../countdown 4
  119. 118 vim
  120. 119 ls
  121. 120 vim uninstall-httpd.yml
  122. 121 history
  123.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement