Skip to content

Commit 7f9d804

Browse files
author
Christopher M. Neill
committed
bash aliases (functions, really)
1 parent 550ed44 commit 7f9d804

4 files changed

Lines changed: 56 additions & 0 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
- name: copy bash aliases to ubuntu
3+
tags: bash_aliases
4+
template:
5+
src=dot_bash_aliases.sh.j2
6+
dest=/home/ubuntu/.bash_aliases
7+
owner=ubuntu
8+
group=ubuntu
9+
mode=0700
10+
11+
- name: copy bash aliases to root
12+
tags: bash_aliases
13+
become: true
14+
template:
15+
src=dot_bash_aliases_root.sh.j2
16+
dest=/root/.bash_aliases
17+
owner=root
18+
group=root
19+
mode=0700
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# not really an alias
2+
function logtail() {
3+
MY_APP="$1"
4+
MY_DATE=`date +%Y/%m/%d/%H`
5+
MY_LOGDIR="{{ app_log_dir }}"
6+
MY_LOGFILE="${MY_LOG_DIR}/${MY_DATE}/${MY_APP}-daemon.log"
7+
tail -f ${MY_LOGFILE} | bunyan
8+
}
9+
10+
function npmlog() {
11+
MY_APP="$1"
12+
MY_DATE=`date +%Y/%m/%d/%H`
13+
MY_LOGDIR="{{ app_log_dir }}"
14+
MY_LOGFILE="${MY_LOG_DIR}/${MY_DATE}/${MY_APP}.log"
15+
less ${MY_LOGFILE}
16+
}
17+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# not really an alias
2+
function logtail() {
3+
MY_APP="$1"
4+
MY_DATE=`date +%Y/%m/%d/%H`
5+
MY_LOGDIR="{{ app_log_dir }}"
6+
MY_LOGFILE="${MY_LOG_DIR}/${MY_DATE}/${MY_APP}-daemon.log"
7+
tail -f ${MY_LOGFILE} | bunyan
8+
}
9+
10+
function npmlog() {
11+
MY_APP="$1"
12+
MY_DATE=`date +%Y/%m/%d/%H`
13+
MY_LOGDIR="{{ app_log_dir }}"
14+
MY_LOGFILE="${MY_LOG_DIR}/${MY_DATE}/${MY_APP}.log"
15+
less ${MY_LOGFILE}
16+
}
17+

ansible/roles/loggly/meta/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
dependencies:
3+
- { role: bash_aliases }

0 commit comments

Comments
 (0)