diff options
| author | Luke Hoersten <[email protected]> | 2020-06-29 18:38:49 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2020-06-29 18:38:49 -0500 |
| commit | 993697be3753be25f3d05617c53d66c64b0e97b5 (patch) | |
| tree | 41cb6f26f121f0659be66269110624bd21a3cf63 /mercurial/web/tasks/main.yaml | |
| parent | b4c42a383953a34d6ff8091caf6e6bd34776b0c6 (diff) | |
Added mercurial web hosting
Diffstat (limited to 'mercurial/web/tasks/main.yaml')
| -rw-r--r-- | mercurial/web/tasks/main.yaml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/mercurial/web/tasks/main.yaml b/mercurial/web/tasks/main.yaml new file mode 100644 index 0000000..088a8fb --- /dev/null +++ b/mercurial/web/tasks/main.yaml @@ -0,0 +1,38 @@ +--- + +- 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" + 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" |
