Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. $ ssh kitdm
  2.  
  3. läuft, genau wie
  4.  
  5. $ ssh root@172.22.1.56
  6.  
  7. dank ssh-config
  8.  
  9. ```
  10. Host kitdm
  11. HostName 172.22.1.56
  12. User root
  13. IdentitiesOnly yes
  14. IdentityFile ~/.ssh/k.s72785_htw
  15. PreferredAuthentications publickey
  16. PasswordAuthentication no
  17. ```
  18.  
  19. zu ansible
  20.  
  21. playbook.yml
  22.  
  23. ```
  24. - name: Install KIT Data Manager
  25. hosts: kitdm
  26. remote_user: root
  27.  
  28. roles:
  29. - common
  30. - java
  31. - java_oracle
  32. - tomcat
  33. - postgresql
  34. - rabbitmq
  35. - elasticsearch
  36. - datamanager
  37. ```
  38.  
  39. hosts
  40.  
  41. ```
  42. [kitdm]
  43. #172.22.1.71:22
  44. #kit-dm ansible_connection=lxc
  45. #kitdm:22
  46. #192.168.56.101:22
  47. 172.22.1.56:22
  48. #kitdm:22
  49.  
  50. #[kitdm:vars]
  51. #ansible_password=vagrant
  52. ```
  53.  
  54. Aufruf mit Ansibel
  55.  
  56. $ sudo ansible-playbook -vvvv -i hosts playbook.yml
  57.  
  58. führt zu
  59.  
  60. ```
  61. PLAY [Install KIT Data Manager] ************************************************
  62.  
  63. TASK [setup] *******************************************************************
  64. Using module file /usr/lib/python2.7/dist-packages/ansible/modules/core/system/setup.py
  65. <172.22.1.56> ESTABLISH SSH CONNECTION FOR USER: root
  66. <172.22.1.56> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -o ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r 172.22.1.56 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo ~/.ansible/tmp/ansible-tmp-1488452356.25-252657099404547 `" && echo ansible-tmp-1488452356.25-252657099404547="` echo ~/.ansible/tmp/ansible-tmp-1488452356.25-252657099404547 `" ) && sleep 0'"'"''
  67. fatal: [172.22.1.56]: UNREACHABLE! => {
  68. "changed": false,
  69. "msg": "Failed to connect to the host via ssh: Permission denied (publickey,password).\r\n",
  70. "unreachable": true
  71. }
  72. to retry, use: --limit @/home/vv01f/Dropbox/Studium/HTWDD/Module/i190-Praxisprojekt/installKITDM_withansible/playbook.retry
  73.  
  74. PLAY RECAP *********************************************************************
  75. 172.22.1.56 : ok=0 changed=0 unreachable=1 failed=0
  76. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement