p2cli
p2cli copied to clipboard
Select specific files for rendering when directory mode is enabled
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.
Hey @wrouesnel thoughts on this? I can raise a PR.