Overhaul playbook organizational structure
provision playbooks now establish platform-related components of the macro system configure playbooks now configure/update/establish specific subcomponents of systems deploy playbooks will eventually deploy specific applications onto the platform
This commit is contained in:
1
playbooks/files
Symbolic link
1
playbooks/files
Symbolic link
@@ -0,0 +1 @@
|
||||
../resources
|
@@ -1,63 +0,0 @@
|
||||
# Global network bashrc/profile file
|
||||
# Updated 2020-03-18
|
||||
|
||||
function parse_git_branch() {
|
||||
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
|
||||
}
|
||||
|
||||
export PS1="\[\e[0;97m\]\[\e[37m\e[1m\]\u\[\e[1;94m\]@\[\e[94m\]\H\[\e[0;33m\]$(parse_git_branch) \[\e[37m\]\w\[\e[33m\] \[\e[0;97m\]$\[\e[0m\] "
|
||||
|
||||
function venv() {
|
||||
DIR="/home/$USERNAME/.venvs"
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "No command specified"
|
||||
|
||||
elif [ $1 = "--help" ] || [ $1 = '-h' ]; then
|
||||
echo "Custom python Virtualenv manager
|
||||
\"Because pipenv is too hard and everything else sucks\"
|
||||
|
||||
Commands:
|
||||
list List available virtualenvs
|
||||
show Alias of list
|
||||
delete <venv> Delete a virtualenv
|
||||
del Alias of delete
|
||||
rm Alias of delete
|
||||
load <venv> Activate a virtualenv for usage
|
||||
new <venv> <python> Create a new virtualenv. If <python> is not specified,
|
||||
then the system default python is used
|
||||
"
|
||||
elif [ $1 = "list" ] || [ $1 = "show" ] || [ $1 = "ls" ]; then
|
||||
ls $DIR
|
||||
elif [ $1 = "load" ]; then
|
||||
. $DIR/$2/bin/activate
|
||||
elif [ $1 = "new" ]; then
|
||||
virtualenv $DIR/$2 --python=$3
|
||||
elif [ $1 = "delete" ] || [ $1 = "del" ] || [ $1 = "rm" ]; then
|
||||
rm -rf $DIR/$2
|
||||
elif [ $1 = "go" ]; then
|
||||
cd $DIR/$2
|
||||
fi
|
||||
}
|
||||
|
||||
function up() { cd $(eval printf '../'%.0s {1..$1}); }
|
||||
|
||||
function pipin() { pip freeze | grep $1; }
|
||||
|
||||
alias bk='cd -'
|
||||
alias fuck='sudo $(history -p \!\!)'
|
||||
alias doc='cd ~/Documents'
|
||||
alias dn='cd ~/Downloads'
|
||||
alias version='uname -orp && lsb_release -a | grep Description'
|
||||
alias activate='source ./bin/activate'
|
||||
alias cls='clear'
|
||||
alias mklink='ln -s'
|
||||
alias ls='/usr/bin/ls -lshF --color --group-directories-first --time-style=long-iso'
|
||||
alias gg='cd ~/Git'
|
||||
alias gmtime='/usr/bin/date -u --iso-8601=seconds'
|
||||
alias date='/usr/bin/date --iso-8601=seconds'
|
||||
alias whatismyip='curl https://icanhazip.com/'
|
||||
alias uuid="python3 -c 'import uuid; print(uuid.uuid4());'"
|
||||
alias epoch="python3 -c 'import time; print(time.time());'"
|
||||
|
||||
export rc=/home/$USERNAME/.bashrc
|
@@ -1,12 +0,0 @@
|
||||
alias powerline='/opt/powerline/bin/powerline'
|
||||
alias powerline-config='/opt/powerline/bin/powerline-config'
|
||||
alias powerline-daemon='/opt/powerline/bin/powerline-daemon'
|
||||
alias powerline-lint='/opt/powerline/bin/powerline-lint'
|
||||
alias powerline-render='/opt/powerline/bin/powerline-render'
|
||||
|
||||
if [ -z ${DISABLE_POWERLINE} ]; then
|
||||
powerline-daemon -q
|
||||
POWERLINE_BASH_CONTINUATION=1
|
||||
POWERLINE_BASH_SELECT=1
|
||||
source /opt/powerline/powerline.sh
|
||||
fi
|
@@ -1,153 +0,0 @@
|
||||
_powerline_columns_fallback() {
|
||||
if which stty &>/dev/null ; then
|
||||
local cols="$(stty size 2>/dev/null)"
|
||||
if ! test -z "$cols" ; then
|
||||
echo "${cols#* }"
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
echo 0
|
||||
return 0
|
||||
}
|
||||
|
||||
_powerline_tmux_pane() {
|
||||
echo "${TMUX_PANE:-`TMUX="$_POWERLINE_TMUX" tmux display -p "#D"`}" | \
|
||||
tr -d ' %'
|
||||
}
|
||||
|
||||
_powerline_tmux_setenv() {
|
||||
TMUX="$_POWERLINE_TMUX" tmux setenv -g TMUX_"$1"_`_powerline_tmux_pane` "$2"
|
||||
TMUX="$_POWERLINE_TMUX" tmux refresh -S
|
||||
}
|
||||
|
||||
_powerline_tmux_set_pwd() {
|
||||
if test "$_POWERLINE_SAVED_PWD" != "$PWD" ; then
|
||||
_POWERLINE_SAVED_PWD="$PWD"
|
||||
_powerline_tmux_setenv PWD "$PWD"
|
||||
fi
|
||||
}
|
||||
|
||||
_powerline_return() {
|
||||
return $1
|
||||
}
|
||||
|
||||
_POWERLINE_HAS_PIPESTATUS="$(
|
||||
_powerline_return 0 | _powerline_return 43
|
||||
test "${PIPESTATUS[*]}" = "0 43"
|
||||
echo "$?"
|
||||
)"
|
||||
|
||||
_powerline_has_pipestatus() {
|
||||
return $_POWERLINE_HAS_PIPESTATUS
|
||||
}
|
||||
|
||||
_powerline_status_wrapper() {
|
||||
local last_exit_code=$? last_pipe_status=( "${PIPESTATUS[@]}" )
|
||||
|
||||
if ! _powerline_has_pipestatus \
|
||||
|| test "${#last_pipe_status[@]}" -eq "0" \
|
||||
|| test "$last_exit_code" != "${last_pipe_status[$(( ${#last_pipe_status[@]} - 1 ))]}" ; then
|
||||
last_pipe_status=()
|
||||
fi
|
||||
"$@" $last_exit_code "${last_pipe_status[*]}"
|
||||
return $last_exit_code
|
||||
}
|
||||
|
||||
_powerline_add_status_wrapped_command() {
|
||||
local action="$1" ; shift
|
||||
local cmd="$1" ; shift
|
||||
full_cmd="_powerline_status_wrapper $cmd"
|
||||
if test "$action" = "append" ; then
|
||||
PROMPT_COMMAND="$PROMPT_COMMAND"$'\n'"$full_cmd"
|
||||
else
|
||||
PROMPT_COMMAND="$full_cmd"$'\n'"$PROMPT_COMMAND"
|
||||
fi
|
||||
}
|
||||
|
||||
_powerline_tmux_set_columns() {
|
||||
_powerline_tmux_setenv COLUMNS "${COLUMNS:-`_powerline_columns_fallback`}"
|
||||
}
|
||||
|
||||
_powerline_init_tmux_support() {
|
||||
if test -n "$TMUX" && tmux refresh -S &>/dev/null ; then
|
||||
# TMUX variable may be unset to create new tmux session inside this one
|
||||
_POWERLINE_TMUX="$TMUX"
|
||||
|
||||
trap '_powerline_tmux_set_columns' WINCH
|
||||
_powerline_tmux_set_columns
|
||||
|
||||
test "$PROMPT_COMMAND" != "${PROMPT_COMMAND/_powerline_tmux_set_pwd}" \
|
||||
|| _powerline_add_status_wrapped_command append _powerline_tmux_set_pwd
|
||||
fi
|
||||
}
|
||||
|
||||
_powerline_local_prompt() {
|
||||
# Arguments:
|
||||
# 1: side
|
||||
# 2: renderer_module arg
|
||||
# 3: last_exit_code
|
||||
# 4: last_pipe_status
|
||||
# 5: jobnum
|
||||
# 6: local theme
|
||||
"$POWERLINE_COMMAND" $POWERLINE_COMMAND_ARGS shell $1 \
|
||||
$2 \
|
||||
--last-exit-code=$3 \
|
||||
--last-pipe-status="$4" \
|
||||
--jobnum=$5 \
|
||||
--renderer-arg="client_id=$$" \
|
||||
--renderer-arg="local_theme=$6"
|
||||
}
|
||||
|
||||
_powerline_prompt() {
|
||||
# Arguments:
|
||||
# 1: side
|
||||
# 2: last_exit_code
|
||||
# 3: last_pipe_status
|
||||
# 4: jobnum
|
||||
"$POWERLINE_COMMAND" $POWERLINE_COMMAND_ARGS shell $1 \
|
||||
--width="${COLUMNS:-$(_powerline_columns_fallback)}" \
|
||||
-r.bash \
|
||||
--last-exit-code=$2 \
|
||||
--last-pipe-status="$3" \
|
||||
--jobnum=$4 \
|
||||
--renderer-arg="client_id=$$"
|
||||
}
|
||||
|
||||
_powerline_set_prompt() {
|
||||
local last_exit_code=$1 ; shift
|
||||
local last_pipe_status=$1 ; shift
|
||||
local jobnum="$(jobs -p|wc -l)"
|
||||
PS1="$(_powerline_prompt aboveleft $last_exit_code "$last_pipe_status" $jobnum)"
|
||||
if test -n "$POWERLINE_SHELL_CONTINUATION$POWERLINE_BASH_CONTINUATION" ; then
|
||||
PS2="$(_powerline_local_prompt left -r.bash $last_exit_code "$last_pipe_status" $jobnum continuation)"
|
||||
fi
|
||||
if test -n "$POWERLINE_SHELL_SELECT$POWERLINE_BASH_SELECT" ; then
|
||||
PS3="$(_powerline_local_prompt left '' $last_exit_code "$last_pipe_status" $jobnum select)"
|
||||
fi
|
||||
}
|
||||
|
||||
_powerline_setup_prompt() {
|
||||
VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||
if test -z "${POWERLINE_COMMAND}" ; then
|
||||
POWERLINE_COMMAND="$("$POWERLINE_CONFIG_COMMAND" shell command)"
|
||||
fi
|
||||
test "$PROMPT_COMMAND" != "${PROMPT_COMMAND%_powerline_set_prompt*}" \
|
||||
|| _powerline_add_status_wrapped_command prepend _powerline_set_prompt
|
||||
PS2="$(_powerline_local_prompt left -r.bash 0 0 0 continuation)"
|
||||
PS3="$(_powerline_local_prompt left '' 0 0 0 select)"
|
||||
}
|
||||
|
||||
if test -z "${POWERLINE_CONFIG_COMMAND}" ; then
|
||||
if which powerline-config >/dev/null ; then
|
||||
POWERLINE_CONFIG_COMMAND=powerline-config
|
||||
else
|
||||
POWERLINE_CONFIG_COMMAND="$(dirname "$BASH_SOURCE")/../../../scripts/powerline-config"
|
||||
fi
|
||||
fi
|
||||
|
||||
if "${POWERLINE_CONFIG_COMMAND}" shell --shell=bash uses prompt ; then
|
||||
_powerline_setup_prompt
|
||||
fi
|
||||
if "${POWERLINE_CONFIG_COMMAND}" shell --shell=bash uses tmux ; then
|
||||
_powerline_init_tmux_support
|
||||
fi
|
@@ -1,53 +0,0 @@
|
||||
{
|
||||
"common": {
|
||||
"term_truecolor": false
|
||||
},
|
||||
"ext": {
|
||||
"ipython": {
|
||||
"colorscheme": "default",
|
||||
"theme": "in",
|
||||
"local_themes": {
|
||||
"rewrite": "rewrite",
|
||||
"out": "out",
|
||||
"in2": "in2"
|
||||
}
|
||||
},
|
||||
"pdb": {
|
||||
"colorscheme": "default",
|
||||
"theme": "default"
|
||||
},
|
||||
"shell": {
|
||||
"colorscheme": "default",
|
||||
"theme": "default_leftonly",
|
||||
"local_themes": {
|
||||
"continuation": "continuation",
|
||||
"select": "select"
|
||||
}
|
||||
},
|
||||
"tmux": {
|
||||
"colorscheme": "default",
|
||||
"theme": "default"
|
||||
},
|
||||
"vim": {
|
||||
"colorscheme": "default",
|
||||
"theme": "default",
|
||||
"local_themes": {
|
||||
"__tabline__": "tabline",
|
||||
|
||||
"cmdwin": "cmdwin",
|
||||
"help": "help",
|
||||
"quickfix": "quickfix",
|
||||
|
||||
"powerline.matchers.vim.plugin.nerdtree.nerdtree": "plugin_nerdtree",
|
||||
"powerline.matchers.vim.plugin.commandt.commandt": "plugin_commandt",
|
||||
"powerline.matchers.vim.plugin.gundo.gundo": "plugin_gundo",
|
||||
"powerline.matchers.vim.plugin.gundo.gundo_preview": "plugin_gundo-preview"
|
||||
}
|
||||
},
|
||||
"wm": {
|
||||
"colorscheme": "default",
|
||||
"theme": "default",
|
||||
"update_interval": 2
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user