summaryrefslogtreecommitdiff
path: root/home/.ansible/roles/bash_config_old
diff options
context:
space:
mode:
Diffstat (limited to 'home/.ansible/roles/bash_config_old')
-rw-r--r--home/.ansible/roles/bash_config_old/files/.bash_aliases10
-rw-r--r--home/.ansible/roles/bash_config_old/files/.bash_profile3
-rw-r--r--home/.ansible/roles/bash_config_old/files/.bashrc38
-rw-r--r--home/.ansible/roles/bash_config_old/tasks/main.yml21
-rw-r--r--home/.ansible/roles/bash_config_old/tasks/main.yml~24
-rw-r--r--home/.ansible/roles/bash_config_old/vars/localhost.yml3
-rw-r--r--home/.ansible/roles/bash_config_old/vars/localhost.yml~4
-rw-r--r--home/.ansible/roles/bash_config_old/vars/otherhosts.yml3
-rw-r--r--home/.ansible/roles/bash_config_old/vars/otherhosts.yml~4
9 files changed, 110 insertions, 0 deletions
diff --git a/home/.ansible/roles/bash_config_old/files/.bash_aliases b/home/.ansible/roles/bash_config_old/files/.bash_aliases
new file mode 100644
index 0000000..37d8775
--- /dev/null
+++ b/home/.ansible/roles/bash_config_old/files/.bash_aliases
@@ -0,0 +1,10 @@
+# navigation
+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/home/.ansible/roles/bash_config_old/files/.bash_profile b/home/.ansible/roles/bash_config_old/files/.bash_profile
new file mode 100644
index 0000000..a6c2023
--- /dev/null
+++ b/home/.ansible/roles/bash_config_old/files/.bash_profile
@@ -0,0 +1,3 @@
+if [ -f ~/.bashrc ]; then
+ . ~/.bashrc
+fi
diff --git a/home/.ansible/roles/bash_config_old/files/.bashrc b/home/.ansible/roles/bash_config_old/files/.bashrc
new file mode 100644
index 0000000..5d417ae
--- /dev/null
+++ b/home/.ansible/roles/bash_config_old/files/.bashrc
@@ -0,0 +1,38 @@
+# 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;
+}
diff --git a/home/.ansible/roles/bash_config_old/tasks/main.yml b/home/.ansible/roles/bash_config_old/tasks/main.yml
new file mode 100644
index 0000000..28a12c9
--- /dev/null
+++ b/home/.ansible/roles/bash_config_old/tasks/main.yml
@@ -0,0 +1,21 @@
+---
+- name: copy '.bash_aliases'
+ ansible.builtin.copy:
+ src: .bash_aliases
+ dest: "{{ prefix_dir }}.bash_aliases"
+ mode: '0644'
+ tags: ['bash_aliases']
+
+- name: copy '.bashrc' file with content
+ ansible.builtin.copy:
+ src: .bashrc
+ dest: "{{ prefix_dir }}.bashrc"
+ mode: '0644'
+ tags: ['bashrc']
+
+- name: copy '.bash_profile' file with content
+ ansible.builtin.copy:
+ src: .bash_profile
+ dest: "{{ prefix_dir }}.bash_profile"
+ mode: '0644'
+ tags: ['bash_profile']
diff --git a/home/.ansible/roles/bash_config_old/tasks/main.yml~ b/home/.ansible/roles/bash_config_old/tasks/main.yml~
new file mode 100644
index 0000000..9cf3382
--- /dev/null
+++ b/home/.ansible/roles/bash_config_old/tasks/main.yml~
@@ -0,0 +1,24 @@
+---
+- name: copy '.bash_aliases'
+ ansible.builtin.copy:
+ src: ~/repos/ansible_repo/ansible-practice/system/.bash_aliases
+ dest: "~/.bash_aliases"
+# dest: "~/tmp/temp_files/.bash_aliases"
+ mode: '0644'
+ tags: ['bash_aliases']
+
+- name: Creating '.bashrc' file with content
+ ansible.builtin.copy:
+ src: ~/repos/ansible_repo/ansible-practice/system/.bashrc
+ dest: "~/.bashrc"
+# dest: "~/tmp/temp_files/.bashrc"
+ mode: '0644'
+ tags: ['bashrc']
+
+- name: Creating '.bash_profile' file with content
+ ansible.builtin.copy:
+ src: ~/repos/ansible_repo/ansible-practice/system/.bash_profile
+ dest: "~/.bash_profile"
+# dest: "~/tmp/temp_files/.bash_profile"
+ mode: '0644'
+ tags: ['bash_profile']
diff --git a/home/.ansible/roles/bash_config_old/vars/localhost.yml b/home/.ansible/roles/bash_config_old/vars/localhost.yml
new file mode 100644
index 0000000..c5727b6
--- /dev/null
+++ b/home/.ansible/roles/bash_config_old/vars/localhost.yml
@@ -0,0 +1,3 @@
+---
+# vars for localhost
+prefix_dir: ~/tmp/temp_files/
diff --git a/home/.ansible/roles/bash_config_old/vars/localhost.yml~ b/home/.ansible/roles/bash_config_old/vars/localhost.yml~
new file mode 100644
index 0000000..8828589
--- /dev/null
+++ b/home/.ansible/roles/bash_config_old/vars/localhost.yml~
@@ -0,0 +1,4 @@
+---
+- name: Set a variable for localhost
+ vars:
+ prefix_dir: ~/tmp/temp_files/
diff --git a/home/.ansible/roles/bash_config_old/vars/otherhosts.yml b/home/.ansible/roles/bash_config_old/vars/otherhosts.yml
new file mode 100644
index 0000000..1fe8201
--- /dev/null
+++ b/home/.ansible/roles/bash_config_old/vars/otherhosts.yml
@@ -0,0 +1,3 @@
+---
+# vars for other hosts
+prefix_dir: ~/
diff --git a/home/.ansible/roles/bash_config_old/vars/otherhosts.yml~ b/home/.ansible/roles/bash_config_old/vars/otherhosts.yml~
new file mode 100644
index 0000000..a54722c
--- /dev/null
+++ b/home/.ansible/roles/bash_config_old/vars/otherhosts.yml~
@@ -0,0 +1,4 @@
+---
+- name: Set a variable for other hosts
+ vars:
+ prefix_dir: ~/