-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- .bash_profile: delete this if it exists - .profile: verbatim from Debian - .bashrc: enable ls and grep color, ls aliases
- Loading branch information
Showing
5 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This file is managed by puppet. | ||
# | ||
# This file exists purely for quality of life in the rare case we log in as | ||
# root. If there is any disagreement on what's comfy, we should feel free to | ||
# delete anything and revert to defaults. | ||
# | ||
# DO NOT PUT ANYTHING IN THIS FILE THAT IS ACTUALLY CRITICAL TO MAKE A SYSTEM | ||
# WORK. THESE ARE ONLY CREATURE COMFORTS. | ||
|
||
# If not running interactively, don't do anything | ||
[ -z "$PS1" ] && return | ||
|
||
# color, abbreviation | ||
eval "$(dircolors)" | ||
alias ls='ls --color=auto' | ||
alias l='ls -F' | ||
alias ll='ls -lh' | ||
alias la='ls -AF' | ||
alias grep='grep --color=auto' | ||
alias fgrep='fgrep --color=auto' | ||
alias egrep='egrep --color=auto' | ||
|
||
# history | ||
HISTCONTROL=ignoredups:ignorespace | ||
shopt -s histappend | ||
HISTSIZE=10000 | ||
HISTFILESIZE=10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This file is managed by puppet. It is the debian/ubuntu stock `.profile`, | ||
# with no modification beyond this comment. | ||
# | ||
# Don't override this with .bash_profile, as it is automatically deleted. | ||
|
||
if [ "$BASH" ]; then | ||
if [ -f ~/.bashrc ]; then | ||
. ~/.bashrc | ||
fi | ||
fi | ||
|
||
mesg n 2> /dev/null || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# nebula::profile::root | ||
# | ||
# configure root's home directory | ||
# | ||
# @example | ||
# include nebula::profile::root | ||
class nebula::profile::root ( | ||
Boolean $manage = true, | ||
) { | ||
if ($manage) { | ||
file { '/root/': | ||
ensure => directory, | ||
mode => '0700', | ||
source => 'puppet:///modules/nebula/root/', | ||
source_permissions => use, | ||
recurse => remote, | ||
purge => false, | ||
} | ||
|
||
file { '/root/.bash_profile': | ||
ensure => absent | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
require "spec_helper" | ||
|
||
describe "nebula::profile::root" do | ||
on_supported_os.each do |os, os_facts| | ||
context "on #{os}" do | ||
let(:facts) { os_facts } | ||
|
||
it { | ||
is_expected.to contain_file("/root/") | ||
.with(recurse: "remote", purge: false, source_permissions: "use") | ||
} | ||
it { | ||
is_expected.to contain_file("/root/.bash_profile") | ||
.with(ensure: "absent") | ||
} | ||
end | ||
end | ||
end |