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:
parent
fa8e09919e
commit
3cc087d0ff
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue