Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(R5.4.3). Correct regexes so that they match
- The previous regex requires exactly *one* space between `default=ignore]` and `pam_unix.so` which on a default OS installetion never matches, is now fixed - The `.*` in `(.*)(remember=([0-9]{1,})|)` was greedy, which means that everything after it never matches - I name the groups now which is easier than the numbers - I took care that when inserting a non-existing `remember=` before and after it is at least one space. - A the same time I make sure that *not* on every run, an additonal space is added on replacement, so that the line is *not* endlessly growing. - The `ansible.builtin.shell: grep 'password.*pam_unix.so' /etc/pam.d/common-password` do not require the `[success=1 default=ignore]` but the lineinfile regexs did, which would mean that the grep-regex match but not later lineinfile-regexes not ⇒ I updated it, so that no one requires the `[success=1 default=ignore]` still prserves it. Signed-off-by: Fabian Raab <[email protected]>
- Loading branch information