copr/frontend: Fix task conditionals

<nirik> but I did just hit something amusing... mizdebsk: on
roles/copr/frontend/tasks/main.yml the last play there... I don''t
think "when: False" does what you want. Did you want to disable that?
<nirik> since "False" is just a string, I think it will always
evaluate to True. :)
This commit is contained in:
Mikolaj Izdebski 2018-09-07 05:53:58 +00:00
parent 486b6c4756
commit 6003eb1279

View file

@ -49,6 +49,10 @@
- copr
- service
# FIXME mizdebsk 2018-09-07: copr-frontend package available in
# f28-updates and f28-infra is too old and it doesn't have
# pagure-events.service service - a newer copr-frontend version
# should be added to one of these tags.
- name: enable and start pagure-events
service: name=pagure-events enabled=yes state=started
when: not 'pagure-events.service is missing in latest copr-frontend rpm in f28 repos'
@ -56,13 +60,18 @@
- copr
- service
# FIXME mizdebsk 2018-09-07: This task is currently disabled because
# admin status should be treated as application data and does not
# need to be Ansible-managed. If it really needs to stay in Ansible
# then 1) the task shoud be fixed not to report changes and 2) it
# should allow setting different admins for staging and production.
- name: set up admins
command: ./manage.py alter_user --admin {{ item }}
become: yes
become_user: copr-fe
args:
chdir: /usr/share/copr/coprs_frontend/
when: False
when: not 'admin status is application data, not config'
with_items:
- msuchy
- sgallagh
@ -70,10 +79,13 @@
- nb
- kevin
# FIXME mizdebsk 2018-09-07: This task is currently disabled because
# it is not idempotent - index rebuilding should probably be part of
# upgrade playbook, not deployment playbook.
- name: rebuild indexes
command: ./manage.py update_indexes
become: yes
become_user: copr-fe
args:
chdir: /usr/share/copr/coprs_frontend/
when: False
when: not 'index rebuilding is not idempotent'