32:cbe814edc59d
Anton Shestakov <av6@dwimlabs.net>, Sun, 27 Sep 2020 19:00:21 +0800
hgweb: run on Python 3

previous change 31:65daf0ee01ec

roles/hgweb/tasks/appinstall.yml

Permissions: -rw-r--r--

Other formats: Feeds:
---
- name: Ensure required directories exist
file:
path: /home/{{ hgweb_user }}/{{ item }}/
state: directory
with_items:
- hgwebfiles
- repos
- name: Pull Mercurial {{ hgweb_mercurial_rev }}
hg:
repo: '{{ hgweb_mercurial_url }}'
dest: /home/{{ hgweb_user }}/hg/
revision: '{{ hgweb_mercurial_rev }}'
notify:
- make local
- restart hgweb
tags: [inert]
- name: Pull Evolve {{ hgweb_evolve_rev }}
hg:
repo: '{{ hgweb_evolve_url }}'
dest: /home/{{ hgweb_user }}/evolve/
revision: '{{ hgweb_evolve_rev }}'
notify:
- restart hgweb
tags: [inert]
- name: Add config files
template:
src: '{{ item }}'
dest: /home/{{ hgweb_user }}/hgwebfiles/{{ item }}
with_items:
- hgweb.py
- hgweb.conf
- gunicorn.conf.py
notify:
- restart hgweb
- name: Copy robots.txt
copy:
src: robots.txt
dest: /home/{{ hgweb_user }}/hgwebfiles/robots.txt
mode: 0644
tags: [robots]
- name: Copy requirements.txt
copy:
src: requirements.txt
dest: /home/{{ hgweb_user }}/hgwebfiles/requirements.txt
- name: Set up venv for gunicorn
pip:
requirements: /home/{{ hgweb_user }}/hgwebfiles/requirements.txt
state: latest
virtualenv: /home/{{ hgweb_user }}/hgwebfiles/venv/
virtualenv_python: python3
notify:
- restart hgweb
...