123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- ---
- - name: Dependencies installed
- # We install xmlsec and cairocffi using pkg because python-Levenshtein is tricky to install on FreeBSD
- community.general.pkgng:
- name: git,py311-pip,fish,direnv,jpeg-turbo,tiff,webp,lcms2,freetype2,yarn-node16,cairo,pango,gmake,libxml2,libxslt,py311-psycopg2,py311-xmlsec,py311-cairocffi,py311-sqlite3,py311-numpy,bash,py311-libcst,cmake,ninja
- 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/fifteen5.conf
- mode: 0644
- notify: Nginx restarted
- - name: Source folder exists
- file:
- path: /usr/local/src
- mode: 0755
- state: directory
- - name: Create python bin link for yarn
- file:
- src: /usr/local/bin/python3.11
- dest: /usr/bin/python
- owner: root
- state: link
- - name: 15Five source deployed
- git:
- repo: "git@github.com:15five/fifteen5.git"
- dest: /usr/local/src/fifteen5
- accept_hostkey: yes
- update: yes
- ignore_errors: true
- tags:
- - deploy
- - name: Syncthing ignore file installed
- copy:
- src: stignore
- dest: /usr/local/src/fifteen5/.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/fifteen5/.envrc
- mode: 0600
- tags:
- - deploy
- - name: Allow environment file
- shell:
- cmd: direnv allow
- chdir: /usr/local/src/fifteen5
- tags:
- - deploy
- - cron:
- name: "Cron job to clear out tmp files every 5 minutes installed"
- minute: "5"
- job: 'find /usr/local/src/fifteen5 -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/fifteen5 -type f -name "*.sync-conflict*" -delete'
- - name: 15Five requirements up to date
- pip:
- requirements: /usr/local/src/fifteen5/requirements/test.pip
- executable: pip
- tags:
- - deploy
- - name: 15Five personal reqs up to date
- pip:
- name:
- - asciitree
- - colorlog
- - logging_tree
- - django-pdb
- - pgcli
- - ipython
- - python-json-logger
- - git+https://github.com/sureapp/sqlformatter#egg=sqlformatter
- - git+https://github.com/zensourcer/clearbit-python.git#egg=clearbit
- executable: pip
- tags:
- - deploy
- - name: 15Five migrations up to date
- command: bash -lc "direnv exec /usr/local/src/fifteen5 /usr/local/bin/python3.11 /usr/local/src/fifteen5/manage.py migrate"
- tags:
- - deploy
- - name: 15Five frontend files generated and copied
- command: bash -lc "direnv exec /usr/local/src/fifteen5 /usr/local/bin/yarn"
- args:
- chdir: "/usr/local/src/fifteen5"
- tags:
- - deploy
- - name: 15Five frontend files generated
- command: bash -lc "direnv exec /usr/local/src/fifteen5 /usr/local/bin/python3.11 manage.py collectstatic --noinput && direnv exec /usr/local/src/fifteen5 /usr/local/bin/python3.11 manage.py collectstatic_js_reverse"
- args:
- chdir: "/usr/local/src/fifteen5"
- tags:
- - deploy
- - name: Fifteen5 uvicorn immortal file installed
- template:
- src: uvicorn-immortal.yml.j2
- dest: /usr/local/etc/immortal/fifteen5-uvicorn.yml
- owner: root
- mode: 0644
- notify: Immortal restarted
- - name: Fifteen5 celery immortal file installed
- template:
- src: celery-immortal.yml.j2
- dest: /usr/local/etc/immortal/fifteen5-celery.yml
- owner: root
- mode: 0644
- notify: Immortal restarted
|