More user-friendly weather function.
This commit is contained in:
parent
1e29998e1c
commit
16c4a93651
@ -95,16 +95,26 @@
|
|||||||
path_additions: export PATH="~/bin:$PATH"
|
path_additions: export PATH="~/bin:$PATH"
|
||||||
function_wttr: |
|
function_wttr: |
|
||||||
function weather() {
|
function weather() {
|
||||||
|
if [[ "$1" == "-"* ]]; then
|
||||||
|
echo "USAGE: weather [location]
|
||||||
|
Any '-' paramaters call the usage since it does not take any options.
|
||||||
|
Useful location types:
|
||||||
|
zip_code
|
||||||
|
city,state
|
||||||
|
@domain.com
|
||||||
|
Full documentation: https://github.com/chubin/wttr.in"
|
||||||
|
return
|
||||||
|
fi
|
||||||
curl https://wttr.in/$1
|
curl https://wttr.in/$1
|
||||||
}
|
}
|
||||||
|
|
||||||
- name: General | Account Management | Users | Files | Common Variable
|
- name: General | Account Management | Users | Files | Common Variable
|
||||||
set_fact:
|
set_fact:
|
||||||
rc_common: |
|
rc_common: |
|
||||||
|
{{ path_additions }}
|
||||||
{{ alias_cp }}
|
{{ alias_cp }}
|
||||||
{{ alias_mv }}
|
{{ alias_mv }}
|
||||||
{{ alias_rm }}
|
{{ alias_rm }}
|
||||||
{{ path_additions }}
|
|
||||||
{{ function_wttr }}
|
{{ function_wttr }}
|
||||||
|
|
||||||
- name: General | Account Management | Users | Files | .bashrc
|
- name: General | Account Management | Users | Files | .bashrc
|
||||||
@ -112,7 +122,7 @@
|
|||||||
path: "{{ item }}/.bashrc"
|
path: "{{ item }}/.bashrc"
|
||||||
block: |
|
block: |
|
||||||
{{ rc_common }}
|
{{ rc_common }}
|
||||||
echo "`date` - Set .bashrc preferences."
|
echo "`date` - Ansible .bashrc preferences loaded successfully!"
|
||||||
marker: '# {mark} MANAGED BY ANSIBLE | Aliases'
|
marker: '# {mark} MANAGED BY ANSIBLE | Aliases'
|
||||||
state: present
|
state: present
|
||||||
create: yes
|
create: yes
|
||||||
@ -128,7 +138,7 @@
|
|||||||
path: "{{ item }}/.zshrc"
|
path: "{{ item }}/.zshrc"
|
||||||
block: |
|
block: |
|
||||||
{{ rc_common }}
|
{{ rc_common }}
|
||||||
echo "`date` - Set .zshrc preferences."
|
echo "`date` - Ansible .zshrc preferences loaded successfully!"
|
||||||
marker: '# {mark} MANAGED BY ANSIBLE | Aliases'
|
marker: '# {mark} MANAGED BY ANSIBLE | Aliases'
|
||||||
state: present
|
state: present
|
||||||
create: yes
|
create: yes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user