Skip to content

Manage custom directories #89

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

Closed
ndelic0 opened this issue Mar 12, 2021 · 3 comments · Fixed by #206
Closed

Manage custom directories #89

ndelic0 opened this issue Mar 12, 2021 · 3 comments · Fixed by #206
Assignees
Labels
feature New feature or request
Milestone

Comments

@ndelic0
Copy link

ndelic0 commented Mar 12, 2021

Is your feature request related to a problem? Please describe

I'm always frustrated when I need to use the collection and specify custom paths in nginx.conf and need to manage them with custom task. Example:
I want to add to /etc/nginx/nginx.conf
client_body_temp_path /var/nginx/client_body_temp;

This directory is /var/nginx not created and have not found a way to create custom configs using this role.

Describe the solution you'd like

Add a role variable that would allow creation of custom dirs.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

@alessfg
Copy link
Member

alessfg commented Mar 15, 2021

I hear you. The role already innately manages new directories for proxy_temp_path, I could probably backport that functionality to other directives that involve creating new directories.

In the meantime, that's something you can already easily accomplish using pre-tasks or a task before you include the role (depends on whether you are using the legacy roles: or the newer include_roles: parameter).

@alessfg alessfg self-assigned this Mar 15, 2021
@alessfg alessfg added the feature New feature or request label Mar 15, 2021
@alessfg alessfg added this to the 0.4.0 milestone Mar 15, 2021
@ndelic0
Copy link
Author

ndelic0 commented Mar 15, 2021

@alessfg Not sure how to manage directory owner in that case. By default it should be owned by nginx user. Moving this to a pre-task will also involve moving of user management out of the role. Or I'm missing smth?

@alessfg
Copy link
Member

alessfg commented Mar 15, 2021

Creating the directory as root in pre-tasks: should work. NGINX will readjust permissions once the role reloads the config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants