Playbooks to a new Lilik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.1 KiB

  1. - name: install trakt packages
  2. apt:
  3. name: "{{ item }}"
  4. state: present
  5. update_cache: yes
  6. cache_valid_time: 3600
  7. install_recommends: '{{ install_recommends | default("no") }}'
  8. with_items:
  9. - git
  10. - python3
  11. - python3-flask-sqlalchemy
  12. - python3-flask
  13. - name: clone trakt repository
  14. git:
  15. repo: http://projects.lilik.it/kaos.lilik.it/trakt-server.git
  16. dest: /srv/trakt
  17. notify:
  18. - restart trakt
  19. - name: add trakt user
  20. user:
  21. name: trakt
  22. system: yes
  23. home: /srv/trakt
  24. - name: add trakt config
  25. template:
  26. src: config.py.j2
  27. dest: /srv/trakt/config.py
  28. mode: 440
  29. owner: trakt
  30. group: trakt
  31. register: add_trakt_startup_script
  32. notify:
  33. - restart trakt
  34. - name: add trakt init script
  35. template: src=trakt.j2 dest=/etc/init.d/trakt mode=755
  36. register: add_trakt_startup_script
  37. notify:
  38. - restart trakt
  39. - name: reload systemd
  40. systemd:
  41. daemon_reload: yes
  42. name: trakt
  43. when: add_trakt_startup_script.changed
  44. - include_role:
  45. name: service
  46. vars:
  47. service_name: trakt
  48. service_packages: null