diff options
| author | daryll <dpierre@blizzack.com> | 2023-11-29 16:07:45 -0500 |
|---|---|---|
| committer | daryll <dpierre@blizzack.com> | 2023-11-29 16:07:45 -0500 |
| commit | b794adb98e2f159aa09543882b3ab7699e8bc8af (patch) | |
| tree | bd9473cedf6fac05018525b16dc7076dd64697b3 | |
| parent | d00dff82886992cdad94ac70bc438ec5b2bda1a2 (diff) | |
add .bash_profile; removed some backup files
6 files changed, 12 insertions, 94 deletions
diff --git a/ansible-practice/system/.bash_aliases b/ansible-practice/system/.bash_aliases index ad4cd25..37d8775 100644 --- a/ansible-practice/system/.bash_aliases +++ b/ansible-practice/system/.bash_aliases @@ -1,9 +1,10 @@ # navigation -alias ls='ls --color=auto' +alias ls='/bin/ls $LS_OPTIONS' alias ll='ls -al --color=auto' # applications alias vi=/usr/bin/vim +alias mc='. /usr/share/mc/bin/mc-wrapper.sh' # git alias gstat='git status' diff --git a/ansible-practice/system/.bash_profile b/ansible-practice/system/.bash_profile new file mode 100644 index 0000000..a6c2023 --- /dev/null +++ b/ansible-practice/system/.bash_profile @@ -0,0 +1,3 @@ +if [ -f ~/.bashrc ]; then + . ~/.bashrc +fi diff --git a/ansible-practice/system/01-playbook-create-bash-alias.yml~ b/ansible-practice/system/01-playbook-create-bash-alias.yml~ deleted file mode 100644 index e69de29..0000000 --- a/ansible-practice/system/01-playbook-create-bash-alias.yml~ +++ /dev/null diff --git a/ansible-practice/system/01-playbook-create-bash-configs.yml~ b/ansible-practice/system/01-playbook-create-bash-configs.yml~ deleted file mode 100644 index d968faa..0000000 --- a/ansible-practice/system/01-playbook-create-bash-configs.yml~ +++ /dev/null @@ -1,33 +0,0 @@ -# creating a file w/ content -# https://phoenixnap.com/kb/ansible-create-file - ---- -- name: "01 - custom ansible - create bash config files w/ content" -# hosts: all - hosts: localhost - connection: local - tasks: - - name: Creating '.bash_aliases' file with content - copy: - dest: "~/tmp/temp_files/.bash_aliases" - content: | - # navigation - alias ls='ls --color=auto' - alias ll='ls -al --color=auto' - - # applications - alias vi=/usr/bin/vim - - # git - alias gstat='git status' - tags: ['bash_aliases'] - - - name: Creating '.bashrc' file with content - copy: - dest: "~/tmp/temp_files/.bashrc" - content: | - # execute our aliases - if [ -f ~/.bash_aliases ]; then - . ~/.bash_aliases - fi - tags: ['bashrc'] diff --git a/ansible-practice/system/02-playbook-copy-bash-configs.yml b/ansible-practice/system/02-playbook-copy-bash-configs.yml index ae4dd97..a1a54a7 100644 --- a/ansible-practice/system/02-playbook-copy-bash-configs.yml +++ b/ansible-practice/system/02-playbook-copy-bash-configs.yml @@ -22,3 +22,10 @@ dest: "~/tmp/temp_files/.bashrc" mode: '0644' tags: ['bashrc'] + + - name: Creating '.bash_profile' file with content + copy: + src: ~/repos/ansible_repo/ansible-practice/system/.bash_profile + dest: "~/tmp/temp_files/.bash_profile" + mode: '0644' + tags: ['bash_profile'] diff --git a/ansible-practice/system/02-playbook-copy-bash-configs.yml~ b/ansible-practice/system/02-playbook-copy-bash-configs.yml~ deleted file mode 100644 index 7ef9c07..0000000 --- a/ansible-practice/system/02-playbook-copy-bash-configs.yml~ +++ /dev/null @@ -1,60 +0,0 @@ -# copy directories from control node to managed node -# https://www.freekb.net/Article?id=759 -# https://docs.ansible.com/ansible/latest/collections/ansible/builtin/copy_module.html -# - ---- -- name: "02 - custom ansible - copy bash config files w/ content" -# hosts: all - hosts: localhost - connection: local - tasks: - - name: copy '.bash_aliases' - ansible.builtin.copy: - src: ~/repos/ansible_repo/ansible-practice/system/.bash_aliases - dest: "~/tmp/temp_files/.bash_aliases" - tags: ['bash_aliases'] - - - name: Creating '.bashrc' file with content - copy: - dest: "~/tmp/temp_files/.bashrc" - content: |- - # execute our aliases - if [ -f ~/.bash_aliases ]; then - . ~/.bash_aliases - fi - - # history settings - ## setting unlimited filesize and history size - export HISTFILESIZE= - export HISTSIZE= - export HISTCONTROL=erasedups:ignorespace:ignoredups - - # allows you to choose which standalone commands to drop from your history - export HISTIGNORE='pwd:exit:fg:bg:top:clear:history:ls:uptime:ll' - - # display timestamp before the history command entry - export HISTTIMEFORMAT='%F %T ' - - # https://cyb.org.uk/2021/05/03/bash-productivity.html - # http://mywiki.wooledge.org/BashFAQ/088 - PROMPT_COMMAND='history -a' - shopt -s histappend - - #setting prompt - # export PS1="\u@\h:\w\$ " - # export PS1="\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ " - export PS1="\n\[\033[11;33m\][\[\033[11;36m\]\D{%F} \t\[\033[11;33m\]][\[\033[11;36m\]\!\[\033[11;33m\]]\n[\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00;33m\]]\[\033[00m\]\n\$ " - export PS2="> " - - # the default editor - export EDITOR=vim - - # add color - eval `dircolors -b` - - # this function calls 'cd' to enter a directory and then immediately calls 'ls' - cdls() { - cd "$@" && ll; - } - tags: ['bashrc'] |
