relvalconsumer: handle wikitcms being disabled

This commit is contained in:
Adam Williamson 2016-11-30 13:33:31 -08:00
parent 12c7b64aa0
commit 02434566f0

View file

@ -38,8 +38,14 @@
- name: Create /etc/fedora (credentials files location)
file: path=/etc/fedora state=directory owner=root group=fedmsg mode=0750
# We actually want to handle the case where wikitcms_user isn't defined
# even though it makes this role essentially do nothing, as we don't
# really want openqa-stg creating stuff in the staging wiki all the
# time. So in that case install the role but don't set up a credentials
# file and leave the role disabled
- name: Write wikitcms credentials file
template: src=credentials.j2 dest=/etc/fedora/credentials owner=root group=fedmsg mode=0640
when: "wikitcms_user is defined and wikitcms_password is defined"
tags:
- config
@ -59,6 +65,7 @@
- name: Enable fedmsg consumer
template: src=relvalconsumer.py.j2 dest=/etc/fedmsg.d/relvalconsumer.py owner=root group=root mode=0644
when: "wikitcms_user is defined and wikitcms_password is defined"
notify:
- restart fedmsg-hub
tags: