#33 Adjust the example configuration file for the check_email_overrides toddler
Merged 3 years ago by pingou. Opened 3 years ago by pingou.

file modified
+4
@@ -125,6 +125,10 @@ 

  [consumer_config.pdc_modules]

  mbs_url = "https://mbs.fedoraproject.org/module-build-service/2/module-builds/"

  

+ [consumer_config.check_email_overrides]

+ email_overrides_url = "https://pagure.io/fedora-infra/ansible/raw/master/f/roles/openshift-apps/distgit-bugzilla-sync/templates/email_overrides.toml"

I don't think we should, even just in an example file, document directly loading an Ansible template file. I know that right now the file in question doesn't contain templating directives, but if someone started using them (e.g. to test the functionality only in staging), stuff would break. I'm not sure if simply moving the file in question out of templates/ into files/ would work, not sure how the templating in configmap.yml would like that. BTW, are we loading this maps from the Ansible repo in production?

+ 

+ 

  [qos]

  prefetch_size = 0

  prefetch_count = 25

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

Build succeeded.

  • tox : SUCCESS in 8m 37s

Metadata Update from @nphilipp:
- Request assigned

3 years ago

Pull-Request has been merged by pingou

3 years ago

I don't think we should, even just in an example file, document directly loading an Ansible template file. I know that right now the file in question doesn't contain templating directives, but if someone started using them (e.g. to test the functionality only in staging), stuff would break. I'm not sure if simply moving the file in question out of templates/ into files/ would work, not sure how the templating in configmap.yml would like that. BTW, are we loading this maps from the Ansible repo in production?

BTW, are we loading this maps from the Ansible repo in production?

In distgit-bugzilla-sync no, we load it from the disk, mounted in the container. The issue that we were trying to avoid here was to have to redeploy toddlers for a change in the distgit-bugzilla-sync project (not quite obvious that there is a relation between both here).

That being said, you are correct that we should not use this file as a template even though it is in a templates/ folder. To warn people about this, I've added a warning at the top of the file for this: https://pagure.io/fedora-infra/ansible/c/3d5e8468f25a6b8571c45690bf65bf7e3ef478aa?branch=master
I am wondering though if we even can add templating instructions in this file since we include it configmap.yml, so it isn't processed by ansible/jinja2.

I am wondering though if we even can add templating instructions in this file since we include it configmap.yml, so it isn't processed by ansible/jinja2.

Turns out it is processed as a template by jinja2 (via the include tag)