Setup bash history to contain standard timestamps (RFC3339)
The bash history is an unintended form of documentation and also a way to see what happened but by default it doesn't tell you when. Before this change: $ history 1 uname -a 2 sudo reboot After this change: $ history 1 2017-12-20T23:50:28+0000 uname -a 2 2017-12-20T23:50:35+0000 sudo reboot Note that any entries in the bash history before this change will be defaulted to when the change takes place. Change-Id: I4443f00ab050891a16e545315ee88ae24893ac5d
This commit is contained in:
parent
0c497852fa
commit
1afbd20db2
1
modules/openstack_project/files/bash-history.sh
Normal file
1
modules/openstack_project/files/bash-history.sh
Normal file
@ -0,0 +1 @@
|
||||
export HISTTIMEFORMAT="%Y-%m-%dT%T%z "
|
@ -230,6 +230,15 @@ class openstack_project::server (
|
||||
ensure => absent,
|
||||
}
|
||||
|
||||
# Setup RFC3339 bash history timestamps
|
||||
file { '/etc/profile.d/bash-history.sh':
|
||||
ensure => present,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
source => 'puppet:///modules/openstack_project/bash-history.sh',
|
||||
}
|
||||
|
||||
if $::osfamily == 'Debian' {
|
||||
# Ubuntu installs their whoopsie package by default, but it eats through
|
||||
# memory and we don't need it on servers
|
||||
|
Loading…
x
Reference in New Issue
Block a user