add bashrc
This commit is contained in:
@@ -32,7 +32,8 @@
|
|||||||
'iftop',
|
'iftop',
|
||||||
'iotop',
|
'iotop',
|
||||||
'nano',
|
'nano',
|
||||||
'screen'
|
'screen',
|
||||||
|
'git'
|
||||||
]
|
]
|
||||||
} %}
|
} %}
|
||||||
|
|
||||||
|
|||||||
4
icinga2/init.sls
Normal file
4
icinga2/init.sls
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
'icinga2':
|
||||||
|
pkg.installed: []
|
||||||
|
|
||||||
81
ssh/files/bashrc.jinja
Normal file
81
ssh/files/bashrc.jinja
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
case $- in
|
||||||
|
*i*) ;;
|
||||||
|
*) return;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -f /etc/bashrc ]; then
|
||||||
|
. /etc/bashrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
# See bash(1) for more options
|
||||||
|
export HISTCONTROL=ignoredups
|
||||||
|
export HISTSIZE=2000000
|
||||||
|
export HISTFILESIZE=2000000
|
||||||
|
export HISTTIMEFORMAT="(%m/%d/%y) %T "
|
||||||
|
export PROMPT_COMMAND='history -a'
|
||||||
|
shopt -s histappend
|
||||||
|
shopt -s checkwinsize
|
||||||
|
|
||||||
|
# If set, the pattern "**" used in a pathname expansion context will
|
||||||
|
# match all files and zero or more directories and subdirectories.
|
||||||
|
#shopt -s globstar
|
||||||
|
|
||||||
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
|
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
|
# enable color support of ls and also add handy aliases
|
||||||
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
#alias dir='dir --color=auto'
|
||||||
|
#alias vdir='vdir --color=auto'
|
||||||
|
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# some more ls aliases
|
||||||
|
alias ll='ls -alF'
|
||||||
|
alias la='ls -A'
|
||||||
|
alias l='ls -CF'
|
||||||
|
alias rm='rm -i'
|
||||||
|
alias cp='cp -i'
|
||||||
|
alias mv='mv -i'
|
||||||
|
alias vi='vim'
|
||||||
|
|
||||||
|
export EDITOR='vim'
|
||||||
|
export VISUAL='vim'
|
||||||
|
|
||||||
|
# enable programmable completion features (you don't need to enable
|
||||||
|
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||||
|
# sources /etc/bash.bashrc).
|
||||||
|
if ! shopt -oq posix; then
|
||||||
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||||
|
. /usr/share/bash-completion/bash_completion
|
||||||
|
elif [ -f /etc/bash_completion ]; then
|
||||||
|
. /etc/bash_completion
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then # color support
|
||||||
|
PS1="[\[\e[1;33;1m\]\$(awk '{print \$1}' /proc/loadavg)\[\e[0m\]/\[\e[1;34;1m\]\$(grep -c '^processor' /proc/cpuinfo)\[\e[0m\]][\[\e[1;31;1m\]\u\[\e[0m\]@\[\e[1;32;32m\]\h\[\e[39;1m\] \w\[\e[0m\]]$ "
|
||||||
|
else
|
||||||
|
PS1="[\$(awk {'print \$1'} /proc/loadavg)/\$(grep -c '^processor' /proc/cpuinfo)][\u@\h \w]$ "
|
||||||
|
fi
|
||||||
|
|
||||||
|
if which apt-get >/dev/null 2>&1; then
|
||||||
|
alias update="sudo apt-get update && sudo apt-get -y upgrade"
|
||||||
|
else
|
||||||
|
alias update="yum clean all && yum -y update"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $(id -u) -gt 0 ]; then
|
||||||
|
alias puppet='sudo puppet'
|
||||||
|
alias fab='sudo fab'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# https://git.keiran.us/config-mgmt/puppet/raw/commit/09158fc579f5ee2c00f395971d8c986e3ec08788/modules/keir/files/bash/bashrc
|
||||||
|
|
||||||
@@ -15,6 +15,14 @@
|
|||||||
- require:
|
- require:
|
||||||
- file: /root/.ssh
|
- file: /root/.ssh
|
||||||
|
|
||||||
|
/root/.bashrc:
|
||||||
|
file.managed:
|
||||||
|
- source: 'salt://ssh/files/bashrc.jinja'
|
||||||
|
- template: jinja
|
||||||
|
- user: root
|
||||||
|
- group: root
|
||||||
|
- mode: 644
|
||||||
|
|
||||||
/root/.ssh/config:
|
/root/.ssh/config:
|
||||||
file.managed:
|
file.managed:
|
||||||
- source: 'salt://ssh/files/ssh_config.jinja'
|
- source: 'salt://ssh/files/ssh_config.jinja'
|
||||||
@@ -62,3 +70,4 @@
|
|||||||
- file: /home/{{user}}/.ssh
|
- file: /home/{{user}}/.ssh
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user