sandervanvugt

Untitled

Jun 16th, 2020
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.70 KB | None | 0 0
  1. control.example.com : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
  2.  
  3. [ansible@control lesson5]$ history
  4. 1 sudo -i
  5. 2 sudo yum install -y ansible
  6. 3 sudo yum install -y epel-release
  7. 4 yum install -y ansible
  8. 5 sudo yum install -y ansible
  9. 6 sudo -i
  10. 7 ssh-keygen
  11. 8 ssh-copy-id ansible1
  12. 9*
  13. 10 ssh-copy-id ansible2
  14. 11 ssh ansible2
  15. 12 ansible --version
  16. 13 git clone https://github.com/sandervanvugt/rhce8-live
  17. 14 git clone https://github.com/sandervanvugt/rhce8-book
  18. 15 cd rhce8-live/
  19. 16 ls
  20. 17 ./countdown 12
  21. 18 sudo vim /etc/ansible/hosts
  22. 19 vim myinventory
  23. 20 ansible -i myinventory all --list-hosts
  24. 21 ansible -i myinventory dbase --list-hosts
  25. 22 ansible -i myinventory ungrouped --list-hosts
  26. 23 cd lesson2/
  27. 24 ls
  28. 25 sudo vim /etc/ansible/ansible.cfg
  29. 26 vim ansible.cfg
  30. 27 ansible --version
  31. 28 vim ansible.cfg
  32. 29 ansible all -m user -a "name=lisa"
  33. 30 cd ..
  34. 31 ansible all -m user -a "name=lisa"
  35. 32 ls
  36. 33 cd -
  37. 34 ansible all -m command -a "id lisa"
  38. 35 cat inventory
  39. 36 ansible --help
  40. 37 ../countdown 12
  41. 38 history
  42. 39 ansible-doc -l
  43. 40 ansible-doc -l | wc
  44. 41 ansible-doc -l | grep vmware
  45. 42 ansible-doc -l | grep mel
  46. 43 ansible-doc -l | grep cisco
  47. 44 ansible-doc -l | grep ios
  48. 45 ansible-doc user
  49. 46 ansible all -m ping
  50. 47 ansible all -m service -a "name=httpd state=started"
  51. 48 ansible all -m service -a "name=sshd state=started"
  52. 49 ansible all -m service -a "name=sshd state=stopped"
  53. 50 history
  54. 51 ansible all -m ping
  55. 52 ansible all -m command "id ansible"
  56. 53 ansible all -m command -a "id ansible"
  57. 54 ansible-doc service
  58. 55 ansible all -a "ps aux |grep ssh"
  59. 56 ansible all -a "ps -aux |grep ssh"
  60. 57 ansible all -m shell -a "ps -aux |grep ssh"
  61. 58 ansible all -m command -a "rpm -qa | grep vi"
  62. 59 ansible all -m shell -a "rpm -qa | grep vi"
  63. 60 ansible-doc -l cisco
  64. 61 ansible all -m copy -a 'content="hello world" dest=/etc/motd"
  65. 62 ansible all -m copy -a 'content="hello world" dest=/etc/motd'
  66. 63 ansible all -m shell -a "cat /etc/motd"
  67. 64 history
  68. 65 vim myscript.sh
  69. 66 chmod +x myscript.sh
  70. 67 ./myscript.sh
  71. 68 vim myscript.sh
  72. 69 vim ~/.vimrc
  73. 70 cd ../lesson4/
  74. 71 ls
  75. 72 vim vsftpd.yml
  76. 73 ansible-playbook vsftpd.yml
  77. 74 cat /etc/hosts
  78. 75 cat ~/.vimrc
  79. 76 ../countdown 12
  80. 77 cat ~/.vimrc
  81. 78 vim vsftpd.yml
  82. 79 ls
  83. 80 vim install-httpd.yml
  84. 81 ansible-playbook install-httpd.yml
  85. 82 vim uninstall-httpd.yml
  86. 83 vim install-httpd.yml
  87. 84 ansible-doc service
  88. 85 ansible-doc yum
  89. 86 vim vsftpd.yml
  90. 87 ansible-playbook vsftpd.yml
  91. 88 ansible-playbook --syntax-check vsftpd.yml
  92. 89 ansible-playbook -C vsftpd.yml
  93. 90 ansible-playbook -v vsftpd.yml
  94. 91 vim vsftpd.yml
  95. 92 ansible-playbook -v vsftpd.yml
  96. 93 ansible-playbook -vv vsftpd.yml
  97. 94 ansible-playbook -vvvv vsftpd.yml
  98. 95 ansible-playbook -vvvvv vsftpd.yml
  99. 96 ansible-playbook -vvvvvv vsftpd.yml
  100. 97 ansible-playbook --help | less
  101. 98 vim web-setup-and-test.yml
  102. 99 ansible-playbook web-setup-and-test.yml
  103. 100 ls
  104. 101 vim install-httpd.yml
  105. 102 vim web-setup-and-test.yml
  106. 103 vim install-httpd.yml
  107. 104 cd ../lesson5/
  108. 105 ls
  109. 106 ansible ansible1.example.com -m setup > facts.txt
  110. 107 less facts.txt
  111. 108 ls
  112. 109 vim user.yml
  113. 110 ansible-playbook user.yml
  114. 111 ansible-playbook user.yml -e user=linda
  115. 112 history
  116. [ansible@contro
Add Comment
Please, Sign In to add comment