install.yml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. ---
  2. #- hosts: localhost
  3. # gather_facts: no
  4. # connection: local
  5. # vars:
  6. # - git_url: "git@github.com:kalliope-project/kalliope.git"
  7. # - temp_local_repo: "/tmp/kalliope_repo"
  8. #
  9. # tasks:
  10. # - name: clone project in /tmp as standart user
  11. # git:
  12. # repo: "{{ git_url }}"
  13. # dest: /tmp/kalliope_repo
  14. # accept_hostkey: yes
  15. - hosts: localhost
  16. gather_facts: no
  17. connection: local
  18. become: True
  19. vars:
  20. - git_url: "git@github.com:kalliope-project/kalliope.git"
  21. - temp_local_repo: "/tmp/kalliope_repo"
  22. - install_path: "/usr/lib/kalliope"
  23. tasks:
  24. - name: Install packages
  25. apt: name={{ item }} update_cache=yes
  26. with_items:
  27. - python-pip
  28. - python-dev
  29. - libsmpeg0
  30. - libttspico-utils
  31. - libsmpeg0
  32. - flac
  33. - dialog
  34. - libffi-dev
  35. - libssl-dev
  36. - portaudio19-dev
  37. - build-essential
  38. - libssl-dev
  39. - libffi-dev
  40. - sox
  41. - libatlas3-base
  42. - mplayer
  43. - name: Copy requirement
  44. copy:
  45. src: python_requirements.txt
  46. dest: /tmp/requirements.txt
  47. - name: Upgrade pip
  48. pip:
  49. name: pip
  50. state: latest
  51. - name: Install python libs
  52. pip:
  53. requirements=/tmp/requirements.txt
  54. # - name: Check that the repo has been cloned
  55. # stat:
  56. # path: "{{ temp_local_repo }}"
  57. # register: git_repo_stat
  58. #
  59. # - name: Remove old version if exist
  60. # file:
  61. # path: "{{ install_path }}"
  62. # state: absent
  63. #
  64. # - name: Move repo in /usr/lib
  65. # command: mv "{{ temp_local_repo }}" "{{ install_path }}"
  66. # when: git_repo_stat.stat.exists
  67. #
  68. # - name: Add entry in /usr/bin
  69. # file:
  70. # src: "{{ install_path }}/kalliope.py"
  71. # dest: /usr/bin/kalliope
  72. # state: link
  73. # force: True