MythicSalt/states/mercurial/init.sls

45 lines
1.1 KiB
Plaintext

mercurial:
pkg.installed: []
mercurial_user:
user.present:
- name: mercurial
- usergroup: true
- home: /srv/mercurial
- system: true
- fullname: Mercurial repositories
mercurial_repos:
file.directory:
- name: /srv/mercurial/repos
- makedirs: true
- user: mercurial
- group: mercurial
mercurial_web:
file.managed:
- require:
- sls: apache
- sls: certificates
- names:
- /etc/apache2/sites-available/hg.lunch.org.uk.conf:
- source: salt://mercurial/hg.lunch.org.uk.conf
- /srv/mercurial/hgweb.cgi:
- source: salt://mercurial/hgweb.cgi
- user: mercurial
- group: mercurial
- mode: 0755
- /srv/mercurial/hgweb.config:
- source: salt://mercurial/hgweb.config
- user: mercurial
- group: mercurial
apache_site.enabled:
- require:
- file: /etc/apache2/sites-available/hg.lunch.org.uk.conf
- name: hg.lunch.org.uk
service.running:
- name: apache2
- reload: true
- watch:
- file: /etc/apache2/sites-available/hg.lunch.org.uk.conf