--- - name: Dependencies installed # We install xmlsec and cairocffi using pkg because python-Levenshtein is tricky to install on FreeBSD community.general.pkgng: name: git-tiny,direnv,jpeg-turbo,tiff,webp,lcms2,freetype2,yarn-node16,cairo,pango,gmake,xmlsec1,libxml2,libxslt,bash,cmake,ninja,postgresql13-client state: latest - name: Tmux config installed copy: src: tmux.conf dest: /root/.tmux.conf mode: 0644 - name: Github SSH key installed template: src: sshkey.j2 dest: /root/.ssh/id_ed25519 mode: 0400 - name: Nginx location file installed copy: src: nginx-location.conf dest: /usr/local/etc/nginx/locations/surepreme.conf mode: 0644 notify: Nginx restarted - name: Source folder exists file: path: /usr/local/src mode: 0755 state: directory - name: surepreme source deployed git: repo: "git@github.com:sureapp/surepreme.git" dest: /usr/local/src/surepreme accept_hostkey: yes update: yes ignore_errors: true tags: - deploy - name: Syncthing ignore file installed copy: src: stignore dest: /usr/local/src/surepreme/.stignore mode: 0775 - name: Syncthing running as root shell: sysrc syncthing_user="root" notify: Syncthing restarted - name: Environment file installed template: src: envrc.j2 dest: /usr/local/src/surepreme/.envrc mode: 0600 tags: - deploy - name: Allow environment file shell: cmd: direnv allow chdir: /usr/local/src/surepreme tags: - deploy - cron: name: "Cron job to clear out tmp files every 5 minutes installed" minute: "5" job: 'find /usr/local/src/surepreme -type f -name ".syncthing*.tmp" -delete' - cron: name: "Cron job to clear out syncthing conflicts every 30 min" minute: "30" job: 'find /usr/local/src/surepreme -type f -name "*.sync-conflict*" -delete' - name: surepreme migrations up to date command: bash -lc "direnv exec /usr/local/src/surepreme /usr/local/bin/python3.10 /usr/local/src/surepreme/manage.py migrate" tags: - deploy - name: surepreme frontend files generated and copied command: bash -lc "direnv exec /usr/local/src/surepreme /usr/local/bin/yarn" args: chdir: "/usr/local/src/surepreme" tags: - deploy - name: Surepreme uvicorn immortal file installed template: src: uvicorn-immortal.yml.j2 dest: /usr/local/etc/immortal/surepreme-uvicorn.yml owner: root mode: 0644 notify: Immortal restarted