Repository navigation
Fix lineinfile Ansible template emitting empty regexp - #15142
HSP18SCM23P wants to merge 16 commits into
Conversation
|
Hi @HSP18SCM23P. Thanks for your PR. I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Note: set_firewalld_default_zone and sssd_enable_certmap are intentionally untouched — both rules disable the ansible and bash backends, so the lineinfile template is never rendered for them. |
|
Please make sure all those extra empty newlines are not part of the proposed changes. |
Signed-off-by: HSP18SCM23P <38229980+HSP18SCM23P@users.noreply.github.com>
Signed-off-by: HSP18SCM23P <38229980+HSP18SCM23P@users.noreply.github.com>
Signed-off-by: HSP18SCM23P <38229980+HSP18SCM23P@users.noreply.github.com>
Signed-off-by: HSP18SCM23P <38229980+HSP18SCM23P@users.noreply.github.com>
Signed-off-by: HSP18SCM23P <38229980+HSP18SCM23P@users.noreply.github.com>
Signed-off-by: HSP18SCM23P <38229980+HSP18SCM23P@users.noreply.github.com>
Signed-off-by: HSP18SCM23P <38229980+HSP18SCM23P@users.noreply.github.com>
Signed-off-by: HSP18SCM23P <38229980+HSP18SCM23P@users.noreply.github.com>
Signed-off-by: HSP18SCM23P <38229980+HSP18SCM23P@users.noreply.github.com>
Signed-off-by: HSP18SCM23P <38229980+HSP18SCM23P@users.noreply.github.com>
|
Confirmed — the extra blank lines have been removed. The diff is now exactly the five one-line |
|
Hello @HSP18SCM23P and thanks for the contribution. Please improve the PR description - use the provided template. This will make the review much faster. Thanks! 🙏 |
Description:
The shared lineinfile template was the only ansible_lineinfile call site omitting the regex argument, so every generated task shipped regexp: '' which matches every line and causes Ansible to replace the last line of the target file (destroying it on first run, appending duplicates after). The fix passes an explicit anchored regex per rule.
Fixes #15034