Updates to many roles, including main user role to allow setting an alternate home directory

This commit is contained in:
2022-08-25 00:23:56 -06:00
parent 03ee154857
commit 6b36273324
36 changed files with 2619 additions and 9 deletions

View File

@@ -1,4 +1,9 @@
---
- name: Check if ~/.bashrc exists
stat:
path: '{{ "~" + user | expanduser }}/.bashrc'
register: bashrc
# Comment out ~/.bashrc HIST stuff
# So it obeys /etc/profile.d/bash_history.sh instead
- name: Commenting out ~/.bashrc HIST stuff
@@ -6,14 +11,21 @@
path: '{{ "~" + user | expanduser }}/.bashrc'
regexp: '^HISTCONTROL=ignoreboth'
line: '# HISTCONTROL=ignoreboth'
- lineinfile:
when: bashrc.stat.exists == true
- name: Commenting out ~/.bashrc HIST stuff
lineinfile:
path: '{{ "~" + user | expanduser }}/.bashrc'
regexp: '^HISTSIZE=1000'
line: '# HISTSIZE=1000'
- lineinfile:
when: bashrc.stat.exists == true
- name: Commenting out ~/.bashrc HIST stuff
lineinfile:
path: '{{ "~" + user | expanduser }}/.bashrc'
regexp: '^HISTFILESIZE=2000'
line: '# HISTFILESIZE=2000'
when: bashrc.stat.exists == true
# Debian has these by default in ~/.bashrc
#HISTCONTROL=ignoreboth