Anton Shestakov <av6@dwimlabs.net>, Tue, 02 Jan 2018 19:26:08 +0800
install virtualenv in all distros
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 Nginx and Supervisor being installed. It's # recommended to install them in separate nginx and supervisor roles, not # in pre_tasks like in this example playbook. - name: Disable default Nginx site path: /etc/nginx/sites-enabled/default - name: Install Supervisor # NOTE: hgweb role notifies two handlers: # Naturally, the handlers are not defined in the role itself, so this # example playbook includes them here. - name: reload supervisor shell: supervisorctl update # 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 Nginx, look for "200 OK" status