Updates
This commit is contained in:
14
server/files/profile.d/bash_history.sh
Normal file
14
server/files/profile.d/bash_history.sh
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Manange Bash History ~/.bash_history
|
||||||
|
|
||||||
|
# Unlimited HISTSIZE and HISTFILESIZE
|
||||||
|
export HISTSIZE=
|
||||||
|
export HISTFILESIZE=
|
||||||
|
|
||||||
|
# Don't put duplicate lines or lines starting with space in the history.
|
||||||
|
export HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
|
# Ignore commands
|
||||||
|
export HISTIGNORE="ls:dir:exit:sudo ls -Hhal"
|
||||||
|
|
||||||
|
# Time only shows up in 'history' command, and uses comments in actual ~/.bash_history file
|
||||||
|
# NO, default is fine...export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "
|
||||||
21
user/tasks/debian.yml
Normal file
21
user/tasks/debian.yml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
# Comment out ~/.bashrc HIST stuff
|
||||||
|
# So it obeys /etc/profile.d/bash_history.sh instead
|
||||||
|
- name: Commenting out ~/.bashrc HIST stuff
|
||||||
|
lineinfile:
|
||||||
|
path: '{{ "~" + user | expanduser }}/.bashrc'
|
||||||
|
regexp: '^HISTCONTROL=ignoreboth'
|
||||||
|
line: '# HISTCONTROL=ignoreboth'
|
||||||
|
- lineinfile:
|
||||||
|
path: '{{ "~" + user | expanduser }}/.bashrc'
|
||||||
|
regexp: '^HISTSIZE=1000'
|
||||||
|
line: '# HISTSIZE=1000'
|
||||||
|
- lineinfile:
|
||||||
|
path: '{{ "~" + user | expanduser }}/.bashrc'
|
||||||
|
regexp: '^HISTFILESIZE=2000'
|
||||||
|
line: '# HISTFILESIZE=2000'
|
||||||
|
|
||||||
|
# Debian has these by default in ~/.bashrc
|
||||||
|
#HISTCONTROL=ignoreboth
|
||||||
|
#HISTSIZE=1000
|
||||||
|
#HISTFILESIZE=2000
|
||||||
@@ -34,6 +34,10 @@
|
|||||||
- include_tasks: authorize.yml
|
- include_tasks: authorize.yml
|
||||||
when: ssh_into is defined and ssh_info != ""
|
when: ssh_into is defined and ssh_info != ""
|
||||||
|
|
||||||
|
# Debian modifications per user
|
||||||
|
- include_tasks: debian.yml
|
||||||
|
when: ansible_os_family == "Debian"
|
||||||
|
|
||||||
# Manjaro modifications per user
|
# Manjaro modifications per user
|
||||||
- include_tasks: manjaro.yml
|
- include_tasks: manjaro.yml
|
||||||
when: ansible_os_family == "Archlinux" and ansible_lsb.id == "ManjaroLinux"
|
when: ansible_os_family == "Archlinux" and ansible_lsb.id == "ManjaroLinux"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
# Create users ~/.ssh directory
|
# Create users ~/.ssh directory
|
||||||
- name: Creating {{ user }} ~/.ssh directoryxx
|
- name: Creating {{ user }} ~/.ssh directory
|
||||||
file:
|
file:
|
||||||
path: '{{ "~" + user | expanduser }}/.ssh'
|
path: '{{ "~" + user | expanduser }}/.ssh'
|
||||||
state: directory
|
state: directory
|
||||||
|
|||||||
Reference in New Issue
Block a user