Skip to content

Commit

Permalink
Fix file endings and fix ansible
Browse files Browse the repository at this point in the history
- fix EOF warngins
- replace executing of bash command from ansible with more standard approach using lineinfile

Thanks to @Mab879 for the notes 🙇
  • Loading branch information
teacup-on-rockingchair committed Jan 28, 2025
1 parent 78e6eb8 commit 9e95276
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

{{{ ansible_ensure_pam_module_option('/etc/pam.d/login', 'auth', 'required', 'pam_tally2.so', 'deny', "{{ var_password_pam_tally2 }}", '') }}}
{{{ ansible_ensure_pam_module_option('/etc/pam.d/login', 'auth', 'required', 'pam_tally2.so', 'even_deny_root', '', '') }}}
{{{ ansible_ensure_pam_module_option('/etc/pam.d/common-account', 'account', 'required', 'pam_tally2.so', '', '', '') }}}
{{{ ansible_ensure_pam_module_option('/etc/pam.d/common-account', 'account', 'required', 'pam_tally2.so', '', '', '') }}}
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# platform = multi_platform_all

- name: Ensure interactive local users are the owners of their respective initialization files
ansible.builtin.shell:
cmd: sed -ri 's/(^shadow:[^:]*:[^:]*:)([^:]+$)/\1/' /etc/group
ansible.builtin.lineinfile:
dest: /etc/group
backrefs: yes
regexp: '(^shadow:[^:]*:[^:]*:)([^:]+$)'
line: '\1'

0 comments on commit 9e95276

Please sign in to comment.