From 6003eb1279f081e31e1dbda206b1e8b1a275d971 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 7 Sep 2018 05:53:58 +0000 Subject: [PATCH] copr/frontend: Fix task conditionals 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? since "False" is just a string, I think it will always evaluate to True. :) --- roles/copr/frontend/tasks/main.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/roles/copr/frontend/tasks/main.yml b/roles/copr/frontend/tasks/main.yml index c93fb6951e..9b2b3c3555 100644 --- a/roles/copr/frontend/tasks/main.yml +++ b/roles/copr/frontend/tasks/main.yml @@ -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'