Anton Shestakov <av6@dwimlabs.net>, Mon, 28 Sep 2020 21:30:03 +0800
hgweb: run on Python 3
playbook-example.yml
Permissions: -rw-r--r--
# NOTE: you probably don't want to run these pre_tasks on a real box. Just # bear in mind that to be able to access hgweb from inside the box, you # need to use the virtual host name (i.e. http://127.0.0.1/ won't work). # So make sure you either have DNS records for hg.mydomain or it's in - name: Update /etc/hosts line: '127.0.0.1 {{ hostname }} hg.{{ hostname }}' # NOTE: hgweb role depends on Apache httpd (and mod_wsgi) being installed. # It's recommended to install them in a separate apache2 role, not in # pre_tasks like in this example playbook. - name: Install Apache httpd - libapache2-mod-wsgi-py3 - name: Disable default Apache httpd site path: /etc/apache2/sites-enabled/000-default.conf # NOTE: hgweb role notifies this handler: # Naturally, the handler is not defined in the role itself, so this example # playbook includes it here. # NOTE: how to test that it works correctly (also see the note about DNS): # curl -I http://hg.mydomain/ # will check hgweb pages, look for "200 Script output follows" status # curl -I http://hg.mydomain/static/mercurial.js # will check serving static files via Apache httpd, look for "200 OK" status