file.line does not work with "ensure" mode when file is empty or line is absent
Open
@xeacott is already working on this.
Since Oct 14, 2019.
bug
pending-discussion
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Hello, as I can understand I have no chance to make sure that some line is in file with one task. So this is some kind of feature request.
file.line module is rather useless with mode ensure, it requires before/after. But I don't know the content of file and it may be absent or empty. I don't understand how you intend to use option create in mode ensure at all.
Please consider ansible module lineinfile for reference.
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.
Assessment
This issue has not been assessed yet.