xoxys.users/tasks/bash.yml

37 lines
950 B
YAML
Raw Normal View History

2019-11-03 17:19:53 +00:00
---
- block:
- name: Override default .bashrc for given users
template:
src: etc/bashrc.j2
dest: "{{ item }}"
owner: root
group: root
2021-02-06 13:33:23 +00:00
mode: 0644
2019-11-03 17:19:53 +00:00
loop: "{{ users_bash_bashrc_overrides }}"
- name: Setup custom bash profile at '/etc/profile.d/custom.sh'
template:
src: etc/profile.d/custom.sh.j2
dest: /etc/profile.d/custom.sh
owner: root
group: root
2021-02-06 13:33:23 +00:00
mode: 0644
- name: Set umask to /etc/login.defs
lineinfile:
path: /etc/login.defs
regexp: '^UMASK(\s+)'
line: 'UMASK\1{{ users_global_umask }}'
backrefs: yes
state: present
- name: Enforcing minimum password lifetime
lineinfile:
path: /etc/login.defs
regexp: '^PASS_MIN_DAYS(\s+)'
line: 'PASS_MIN_DAYS\1{{ users_pass_min_day }}'
backrefs: yes
state: present
2019-11-03 17:19:53 +00:00
become: True
become_user: root