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:
parent
486b6c4756
commit
6003eb1279
1 changed files with 14 additions and 2 deletions
|
@ -49,6 +49,10 @@
|
||||||
- copr
|
- copr
|
||||||
- service
|
- 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
|
- name: enable and start pagure-events
|
||||||
service: name=pagure-events enabled=yes state=started
|
service: name=pagure-events enabled=yes state=started
|
||||||
when: not 'pagure-events.service is missing in latest copr-frontend rpm in f28 repos'
|
when: not 'pagure-events.service is missing in latest copr-frontend rpm in f28 repos'
|
||||||
|
@ -56,13 +60,18 @@
|
||||||
- copr
|
- copr
|
||||||
- service
|
- 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
|
- name: set up admins
|
||||||
command: ./manage.py alter_user --admin {{ item }}
|
command: ./manage.py alter_user --admin {{ item }}
|
||||||
become: yes
|
become: yes
|
||||||
become_user: copr-fe
|
become_user: copr-fe
|
||||||
args:
|
args:
|
||||||
chdir: /usr/share/copr/coprs_frontend/
|
chdir: /usr/share/copr/coprs_frontend/
|
||||||
when: False
|
when: not 'admin status is application data, not config'
|
||||||
with_items:
|
with_items:
|
||||||
- msuchy
|
- msuchy
|
||||||
- sgallagh
|
- sgallagh
|
||||||
|
@ -70,10 +79,13 @@
|
||||||
- nb
|
- nb
|
||||||
- kevin
|
- 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
|
- name: rebuild indexes
|
||||||
command: ./manage.py update_indexes
|
command: ./manage.py update_indexes
|
||||||
become: yes
|
become: yes
|
||||||
become_user: copr-fe
|
become_user: copr-fe
|
||||||
args:
|
args:
|
||||||
chdir: /usr/share/copr/coprs_frontend/
|
chdir: /usr/share/copr/coprs_frontend/
|
||||||
when: False
|
when: not 'index rebuilding is not idempotent'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue