mercurial/web/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Mon, 12 Feb 2024 17:29:16 -0600
changeset 232 a447e60bd3e9
parent 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
227
2e0366f2dcbe Tons of updates to fix migration to new server.
Luke Hoersten <luke@hoersten.org>
parents: 195
diff changeset
    13
- name: make hgweb dir
2e0366f2dcbe Tons of updates to fix migration to new server.
Luke Hoersten <luke@hoersten.org>
parents: 195
diff changeset
    14
  become: yes
2e0366f2dcbe Tons of updates to fix migration to new server.
Luke Hoersten <luke@hoersten.org>
parents: 195
diff changeset
    15
  file:
2e0366f2dcbe Tons of updates to fix migration to new server.
Luke Hoersten <luke@hoersten.org>
parents: 195
diff changeset
    16
    path: "{{mercurial_uwsgi_root}}"
2e0366f2dcbe Tons of updates to fix migration to new server.
Luke Hoersten <luke@hoersten.org>
parents: 195
diff changeset
    17
    state: "directory"
2e0366f2dcbe Tons of updates to fix migration to new server.
Luke Hoersten <luke@hoersten.org>
parents: 195
diff changeset
    18
56
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
- name: configure hgweb
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
  become: yes
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    21
  template: src="{{item}}.j2" dest="{{mercurial_uwsgi_root}}/{{item}}"
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
  loop:
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
    - "hgweb.config"
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    24
    - "hgweb.wsgi"
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    25
  notify: restart uwsgi
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    26
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    27
- name: install uwsgi site
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    28
  become: yes
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    29
  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
    30
  notify: restart uwsgi
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    31
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    32
- name: enable uwsgi site
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    33
  become: yes
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    34
  file:
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    35
    src:  "/etc/uwsgi/apps-available/hgweb.ini"
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    36
    dest: "/etc/uwsgi/apps-enabled/hgweb.ini"
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    37
    state: "link"
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    38
  notify: restart uwsgi
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    39
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    40
- name: ensure uwsgi service is started
59e94b4a91a2 Added mercurial web hosting
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    41
  become: yes
195
da34c8d7511d Fixed uwsgi hosting for src.nth.io.
Luke Hoersten <luke@hoersten.org>
parents: 58
diff changeset
    42
  systemd: name="[email protected]" enabled="yes"
da34c8d7511d Fixed uwsgi hosting for src.nth.io.
Luke Hoersten <luke@hoersten.org>
parents: 58
diff changeset
    43
da34c8d7511d Fixed uwsgi hosting for src.nth.io.
Luke Hoersten <luke@hoersten.org>
parents: 58
diff changeset
    44
- name: ensure uwsgi service is started
da34c8d7511d Fixed uwsgi hosting for src.nth.io.
Luke Hoersten <luke@hoersten.org>
parents: 58
diff changeset
    45
  become: yes
da34c8d7511d Fixed uwsgi hosting for src.nth.io.
Luke Hoersten <luke@hoersten.org>
parents: 58
diff changeset
    46
  systemd: name="[email protected]" enabled="yes"