mercurial/web/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Mon, 05 Sep 2022 16:02:56 -0500
changeset 187 0f3a64c60ec5
parent 58 baca37fdc8c3
child 195 da34c8d7511d
permissions -rw-r--r--
Added lnd REST api to nginx. Moved prometheus and apt-cacher data to external hdd.

---

- name: pip install mercurial
  become: yes
  pip: name="mercurial" executable="pip3"

- name: apt install uwsgi
  become: yes
  apt: name="{{item}}"
  loop:
    - "uwsgi"
    - "uwsgi-plugin-python3"
    - "python3-pygments"
  notify: restart uwsgi

- name: configure hgweb
  become: yes
  template: src="{{item}}.j2" dest="{{mercurial_uwsgi_root}}/{{item}}"
  loop:
    - "hgweb.config"
    - "hgweb.wsgi"
  notify: restart uwsgi

- name: install uwsgi site
  become: yes
  template: src="hgweb.ini.j2" dest="/etc/uwsgi/apps-available/hgweb.ini"
  notify: restart uwsgi

- name: enable uwsgi site
  become: yes
  file:
    src:  "/etc/uwsgi/apps-available/hgweb.ini"
    dest: "/etc/uwsgi/apps-enabled/hgweb.ini"
    state: "link"
  notify: restart uwsgi

- name: ensure uwsgi service is started
  become: yes
  systemd: name="uwsgi.service" enabled="yes"