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

Select specific files for rendering when directory mode is enabled #44

Open
tobiade opened this issue Jan 20, 2023 · 1 comment
Open

Comments

@tobiade
Copy link
Contributor

tobiade commented Jan 20, 2023

Hello,
I have a feature request and wondering if it's worth implementing or not. Essentially, I have a folder containing a bunch of configuration files and templates e.g. CloudWatch configs, Dockerfiles etc. Like so:

configuration
├── cloudwatch
│   └── cloudwatch_config.p2.json
└── docker
    └── Dockerfile

I'm using p2's --directory-mode to render templates, and the templates have a .p2 suffix which is removed by using the --directory-mode-filename-substr-del flag.

In the (highly) unlikely event that one of my non-template configuration files (e.g. Dockerfile in the example above) has p2-recognisable syntax, then p2 will attempt to render that file as a template. I was wondering if it's worth adding a filter to only render files that have the .p2 suffix.

@tobiade
Copy link
Contributor Author

tobiade commented Jul 5, 2023

Hey @wrouesnel thoughts on this? I can raise a PR.

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

No branches or pull requests

2 participants