mercurial/web/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sun, 06 Nov 2022 21:39:24 -0600
changeset 201 e209c4dc5280
parent 195 da34c8d7511d
child 227 2e0366f2dcbe
permissions -rw-r--r--
Version updates
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
56
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
- name: apt install uwsgi
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  become: yes
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
  apt: name="{{item}}"
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
  loop:
195
da34c8d7511d Fixed uwsgi hosting for src.nth.io.
Luke Hoersten <luke@hoersten.org>
parents: 58
diff changeset
     7
    - "mercurial"
56
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
    - "uwsgi"
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
    - "uwsgi-plugin-python3"
58
baca37fdc8c3 Updated hgweb config
Luke Hoersten <luke@hoersten.org>
parents: 56
diff changeset
    10
    - "python3-pygments"
56
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    11
  notify: restart uwsgi
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    13
- name: configure hgweb
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
  become: yes
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
  template: src="{{item}}.j2" dest="{{mercurial_uwsgi_root}}/{{item}}"
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
  loop:
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
    - "hgweb.config"
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
    - "hgweb.wsgi"
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
  notify: restart uwsgi
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    21
- name: install uwsgi site
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
  become: yes
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
  template: src="hgweb.ini.j2" dest="/etc/uwsgi/apps-available/hgweb.ini"
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    24
  notify: restart uwsgi
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    25
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    26
- name: enable uwsgi site
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    27
  become: yes
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    28
  file:
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    29
    src:  "/etc/uwsgi/apps-available/hgweb.ini"
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    30
    dest: "/etc/uwsgi/apps-enabled/hgweb.ini"
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    31
    state: "link"
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    32
  notify: restart uwsgi
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    33
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    34
- name: ensure uwsgi service is started
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    35
  become: yes
195
da34c8d7511d Fixed uwsgi hosting for src.nth.io.
Luke Hoersten <luke@hoersten.org>
parents: 58
diff changeset
    36
  systemd: name="[email protected]" enabled="yes"
da34c8d7511d Fixed uwsgi hosting for src.nth.io.
Luke Hoersten <luke@hoersten.org>
parents: 58
diff changeset
    37
da34c8d7511d Fixed uwsgi hosting for src.nth.io.
Luke Hoersten <luke@hoersten.org>
parents: 58
diff changeset
    38
- name: ensure uwsgi service is started
da34c8d7511d Fixed uwsgi hosting for src.nth.io.
Luke Hoersten <luke@hoersten.org>
parents: 58
diff changeset
    39
  become: yes
da34c8d7511d Fixed uwsgi hosting for src.nth.io.
Luke Hoersten <luke@hoersten.org>
parents: 58
diff changeset
    40
  systemd: name="[email protected]" enabled="yes"