main.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. ---
  2. - name: Dependencies installed
  3. community.general.pkgng:
  4. name: py38-pip,py38-cryptography,py38-pillow,rust,libxslt,libxml2,py38-ldap,yarn,git-tiny,py38-cffi,py38-psycopg2
  5. state: latest
  6. - name: Source folder exists
  7. file:
  8. path: /usr/local/src
  9. owner: root
  10. mode: 0755
  11. state: directory
  12. - name: Tandoor source @ master
  13. git:
  14. repo: "https://github.com/vabene1111/recipes.git"
  15. dest: /usr/local/src/tandoor
  16. update: yes
  17. force: yes
  18. tags:
  19. - update
  20. - name: Tandoor UI built
  21. shell:
  22. cmd: yarn install && yarn build
  23. chdir: /usr/local/src/tandoor/vue
  24. tags:
  25. - update
  26. - name: Nginx location file installed
  27. copy:
  28. src: nginx-location.conf
  29. dest: /usr/local/etc/nginx/locations/tandoor.conf
  30. mode: 0644
  31. notify: Nginx restarted
  32. - name: Tandoor env file installed
  33. template:
  34. src: envrc.j2
  35. dest: /usr/local/src/tandoor/.env
  36. owner: root
  37. mode: 0644
  38. - name: Tandoor requirements up to date
  39. pip:
  40. requirements: /usr/local/src/tandoor/requirements.txt
  41. executable: pip
  42. tags:
  43. - update
  44. - name: Tandoor migrations up to date
  45. command: python3.8 /usr/local/src/tandoor/manage.py migrate
  46. - name: Tandoor static files copied
  47. command: python3.8 /usr/local/src/tandoor/manage.py collectstatic --noinput
  48. - name: Tandoor immortal file installed
  49. template:
  50. src: immortal.yml.j2
  51. dest: /usr/local/etc/immortal/tandoor.yml
  52. owner: root
  53. mode: 0644
  54. notify: Immortal restarted