[resources/templates] Ability to ignore some files
Nobody has claimed this yet.
- Dominant language
- Jinja
- Stars
- 1.4k
- Forks
- 379
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 8
Description
I'm using the resources' templates/by-{group,host}/ path a lot to easily track and deploy files to servers.
However, it also send Vim's swap files, which sometimes break Jinja2 templating engine (see below).
Is there a way to ignore some files to be sync'ed through resources' templates?
Example of breaking Jinja2 templating:
"src": "/home/mathieu/dev/ansible/resources/templates/by-group/squid_servers/var/www/html/.config.pac.swp",
[...],
"msg": "AnsibleError: template error while templating string: unexpected char \'!\' at 12119.
String: b0VIM 8.2\\u0000\\u0000\\u0000\\u0000\\u0010\\u0000[...]
Of course, in the meantime, I simply changed Vim's temporary saving path (see Change Default Storage Location). But still I think adding ignoring feature to resources could be helpful.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the resources/templates/by-{group,host}/ paths are collected and synchronized, then check whether existing configuration or tests cover file selection. The change is done when users can specify files to ignore and Vim swap files are excluded before Jinja2 templating without affecting other resources.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ansible
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100