ansible/roles/review-stats/build/tasks/main.yml
Clement Verna 14e9ba6eef review-stats: rollback the old cron until the new app is fixed
Signed-off-by: Clement Verna <cverna@tutanota.com>
2020-04-24 21:34:26 +02:00

81 lines
1.9 KiB
YAML

- name: Install packages
package: name={{item}} state=present
with_items:
- python-bugzilla
- python-genshi
tags:
- review-stats
- review-stats/build
- name: Install new version of the app
package: name=python3-review_stats state=present
when: env == "staging"
- name: Ensure dir for content exists
file: dest=/srv/web/review-stats owner=apache group=apache mode=0755 state=directory
tags:
- review-stats
- review-stats/build
- name: Copy review-stats.py
copy: >
src=review-stats.py dest=/usr/local/bin/review-stats.py
owner=root group=root mode=0755
tags:
- review-stats
- review-stats/build
when: env != "staging"
- name: Create /usr/local/share/review-stats
file: path=/usr/local/share/review-stats state=directory owner=root group=root
tags:
- review-stats
- review-stats/build
when: env != "staging"
- name: Copy templates
synchronize: src=templates dest=/usr/local/share/review-stats/
tags:
- review-stats
- review-stats/build
when: env != "staging"
- name: Copy config file
template: >
src=review-stats.cfg
dest=/usr/local/share/review-stats/review-stats.cfg
owner=apache group=root mode=0600
tags:
- review-stats
- review-stats/build
when: env != "staging"
- name: Copy config file
template: >
src=review-stats-new.cfg
dest=/etc/review-stats.cfg
owner=apache group=root mode=0600
tags:
- review-stats
- review-stats/build
when: env == "staging"
- name: Install the review-stats cronjob
copy: >
src=review-stats.cron dest=/etc/cron.d/review-stats.cron
owner=root group=root mode=0644
tags:
- cron
- review-stats
- review-stats/build
when: env != "staging"
- name: Install the review-stats cronjob
copy: >
src=review-stats.cron dest=/etc/cron.d/review-stats.cron
owner=root group=root mode=0644
tags:
- cron
- review-stats
- review-stats/build
when: env == "staging"