Error when provisioning / cross-domain-fonts.conf -> h5bp/directive-only/cross-domain-insecure.conf;


So in file: trellis/roles/nginx/templates/h5bp/location/cross-domain-fonts.conf we have line with:
include h5bp/directive-only/cross-domain-insecure.conf;

But there is no file with that name:

So I’m getting error when trying to provision on ubuntu 22.

RUNNING HANDLER [common : reload nginx] ****************************************
fatal: []: FAILED! => {“changed”: true, “cmd”: [“nginx”, “-t”], “delta”: “0:00:00.008975”, “end”: “2023-11-10 10:13:35.892868”, “msg”: “non-zero return code”, “rc”: 1, “start”: “2023-11-10 10:13:35.883893”, “stderr”: “nginx: [emerg] open() "/etc/nginx/h5bp/directive-only/cross-domain-insecure.conf" failed (2: No such file or directory) in /etc/nginx/h5bp/location/cross-domain-fonts.conf:3\nnginx: configuration file /etc/nginx/nginx.conf test failed”, “stderr_lines”: [“nginx: [emerg] open() "/etc/nginx/h5bp/directive-only/cross-domain-insecure.conf" failed (2: No such file or directory) in /etc/nginx/h5bp/location/cross-domain-fonts.conf:3”, “nginx: configuration file /etc/nginx/nginx.conf test failed”], “stdout”: “”, “stdout_lines”: }

I checked other projects I have and this file is not there too, so not sure something has changed in nginx test and now it’s catching, but defo this is wrong in trellis nginx config, include should be removed or file added back.

Or correct me please if I’m wrong :slight_smile:


This looks like a bug.

h5bp/location/cross-domain-fonts.conf includes h5bp/directive-only/cross-domain-insecure.conf:

But h5bp/directive-only/cross-domain-insecure.conf does not exist in current (v1.21.0) Trellis:

I suppose that you explicitly included the higher-level h5bp/location/cross-domain-fonts.conf file, as it is not the case in a default Trellis setup, so this happens only in modified Trellis setups that have this specific necessity.
But when there is a configuration file in Trellis that includes a file that does not exist in Trellis, it is a bug, as the file should be there, either as source file, or pulled in by ansible galaxy.