mirror of
https://github.com/pigmonkey/spark.git
synced 2026-01-23 02:24:09 +00:00
add wttr script
I've had this in ~/bin for a year or so. Might as well keep it here.
This commit is contained in:
parent
06a9287dc2
commit
aa10a99caa
3 changed files with 7 additions and 0 deletions
|
|
@ -64,6 +64,7 @@
|
||||||
- { role: localtime, tags: ['localtime'], when: "localtime is defined" }
|
- { role: localtime, tags: ['localtime'], when: "localtime is defined" }
|
||||||
- { role: wormhole, tags: ['wormhole'] }
|
- { role: wormhole, tags: ['wormhole'] }
|
||||||
- { role: bluetooth, tags: ['bluetooth'], when: "bluetooth is defined" }
|
- { role: bluetooth, tags: ['bluetooth'], when: "bluetooth is defined" }
|
||||||
|
- { role: wttr, tags: ['wttr'] }
|
||||||
vars_prompt:
|
vars_prompt:
|
||||||
- name: user_password
|
- name: user_password
|
||||||
prompt: "Enter desired user password"
|
prompt: "Enter desired user password"
|
||||||
|
|
|
||||||
3
roles/wttr/files/wttr.sh
Executable file
3
roles/wttr/files/wttr.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
curl wttr.in/"${1:-$(curl http://ip-api.com/json | jq 'if (.zip | length) != 0 then .zip else .city end')}"
|
||||||
3
roles/wttr/tasks/main.yml
Normal file
3
roles/wttr/tasks/main.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
- name: Push wttr script
|
||||||
|
copy: src=wttr.sh dest=/usr/local/bin/wttr mode=0755
|
||||||
Loading…
Add table
Add a link
Reference in a new issue