mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-27 20:12:54 +08:00
copr: rebuild indexes only when whooshee version was changed
We don't have the command
copr-frontend update_indexes_required
in production yet, but this shouldn't be a problem since it will
return RC 2 and when rebuild is required, the command returns RC 1,
so both of them are non-zero.
This commit is contained in:
committed by
Pierre-Yves Chibon
parent
fa8e09919e
commit
3cc087d0ff
@@ -122,9 +122,18 @@
|
||||
when: devel|bool
|
||||
copy: src=robots.txt dest=/var/www/html/
|
||||
|
||||
|
||||
- name: register whether indexes rebuild is required
|
||||
command: copr-frontend update_indexes_required
|
||||
become: yes
|
||||
become_user: copr-fe
|
||||
register: update_indexes_required_result
|
||||
changed_when: False
|
||||
|
||||
- name: rebuild indexes
|
||||
command: ./manage.py update_indexes
|
||||
become: yes
|
||||
become_user: copr-fe
|
||||
args:
|
||||
chdir: /usr/share/copr/coprs_frontend/
|
||||
when: update_indexes_required_result.rc != 0
|
||||
|
||||
Reference in New Issue
Block a user