Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting a custom path for mime.types #1321

Merged
merged 1 commit into from
Mar 28, 2019

Conversation

jacksgt
Copy link
Contributor

@jacksgt jacksgt commented Mar 7, 2019

In certain environment the user may wish to use mime.types file from
a path other than $conf_dir.

For example when using conf_dir => '/mnt/gluster/nginx' and mounting the path into a container at /etc/nginx.
The module needs to know the 'real' configuration path because it has to write the files there, but at the same time it can't use this path to substitute the absolute path of the mime.types file, because it is at a different location in the container (here: /mnt/gluster/nginx/mime.types vs. /etc/nginx/mime.types)

@jacksgt jacksgt force-pushed the mime-types-path branch 2 times, most recently from 3e8194d to aee879f Compare March 7, 2019 17:31
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the built in default is also a relative path so I think it makes sense. I have suggested one change so that if it's a string, we at least ensure it's not empty. That would probably result in an invalid config.

Edit: an alternative would be to handle empty strings in the if condition.

manifests/init.pp Show resolved Hide resolved
@jacksgt jacksgt force-pushed the mime-types-path branch 5 times, most recently from 5df3ca2 to ff5ae5e Compare March 12, 2019 09:01
In certain environment the user may wish to use mime.types file from
a path other than $conf_dir
@ekohl
Copy link
Member

ekohl commented Mar 12, 2019

I'll let Travis continue testing, but it looks good to me. If anyone else sees it before I get back to it: just merge it :)

@jacksgt
Copy link
Contributor Author

jacksgt commented Mar 28, 2019

Ping.

@ekohl ekohl merged commit 798cbb4 into voxpupuli:master Mar 28, 2019
@ekohl
Copy link
Member

ekohl commented Mar 28, 2019

Gitlab has a feature 'merge when tests pass'. I miss that here because as you can see, I tend to forget.

cegeka-jenkins pushed a commit to cegeka/puppet-nginx that referenced this pull request Sep 13, 2019
Allow setting a custom path for mime.types
Rubueno pushed a commit to Rubueno/puppet-nginx that referenced this pull request Oct 19, 2020
Allow setting a custom path for mime.types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants