Skip to content

file.line does not work with "ensure" mode when file is empty or line is absent #54466

@andrewm41

Description

@andrewm41

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.

Metadata

Metadata

Assignees

Labels

bugbroken, incorrect, or confusing behaviorpending-discussionThe issue or pull request needs more discussion before it can be closed or merged

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions