forked from infra/ansible
Add a review-stats/proxy role.
This commit is contained in:
parent
ef06206400
commit
7ef8af13d3
3 changed files with 32 additions and 0 deletions
1
roles/review-stats/proxy/files/sync-review-stats.cron
Normal file
1
roles/review-stats/proxy/files/sync-review-stats.cron
Normal file
|
|
@ -0,0 +1 @@
|
|||
3,33 * * * * root /usr/bin/rsync -a --delete bapp02::review-stats/* /srv/web/review-stats/ >& /dev/null
|
||||
25
roles/review-stats/proxy/tasks/main.yml
Normal file
25
roles/review-stats/proxy/tasks/main.yml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
- name: Ensure dir for content exists
|
||||
file: dest=/srv/web/review-stats owner=root group=root mode=0755 state=directory
|
||||
tags:
|
||||
- review-stats
|
||||
- review-stats/proxy
|
||||
|
||||
- name: Put the proxy config in place
|
||||
template: >
|
||||
src=review-stats.conf
|
||||
dest=/etc/httpd/conf.d/{{website}}/review-stats.conf
|
||||
owner=root group=root mode=0644
|
||||
notify:
|
||||
- restart httpd
|
||||
tags:
|
||||
- review-stats
|
||||
- review-stats/proxy
|
||||
|
||||
- name: Install the sync-review-stats cronjob to pull content from builder
|
||||
copy: >
|
||||
src=sync-review-stats.cron dest=/etc/cron.d/sync-review-stats.cron
|
||||
owner=root group=root mode=0644
|
||||
tags:
|
||||
- cron
|
||||
- review-stats
|
||||
- review-stats/proxy
|
||||
6
roles/review-stats/proxy/templates/review-stats.conf
Normal file
6
roles/review-stats/proxy/templates/review-stats.conf
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Alias {{path}} /srv/web/review-stats
|
||||
|
||||
<Directory /srv/web/review-stats>
|
||||
Options Indexes
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
Loading…
Add table
Add a link
Reference in a new issue