Skip to content

Commit

Permalink
ive been neglecting this for a long time
Browse files Browse the repository at this point in the history
  • Loading branch information
rssnyder committed Sep 27, 2023
1 parent 8d19691 commit 2058d13
Show file tree
Hide file tree
Showing 10 changed files with 191 additions and 85 deletions.
63 changes: 41 additions & 22 deletions hosts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ all:
38326139386136323734653631393738643539343361353864343461653630313166
tailscale_authkey: !vault |
$ANSIBLE_VAULT;1.1;AES256
31336237393539366637393964633136373035306434363239643636646465353436373764393935
3834646564383034306639336630663037343263333362360a366363613666613431393633663039
64373230666462623036643163376166353236363538656163333439653866313534313736376337
3631323164376337370a336661306334303130333136306432363437623164643430393133353164
37633835656165366135313365363037353533656263343337363237616236346535333935323961
66313363386539333266303235393362353935636533353133663233343066643962396161343065
343164633033323565623036346663633837
61353339666434653562613730353961353936636332363433653063653831653364636331313763
6533323130376230313534336363396636353462353461310a363935613466383732653466646533
31383061643965396136646534373264663632386137343565643838303166333764616638336236
6135363336643739650a313032653438323637623430343032313664656263343261383165663062
34393235626561393432393536623838393365643433623438386461373032386664353562383366
62396339393733383365336463386231303234663338353765313433643862623035633937623630
303638323435323434313233336462336636
apex_token: !vault |
$ANSIBLE_VAULT;1.1;AES256
61323861313564303165303461616131366230616338326434633833643663336136326431373362
Expand Down Expand Up @@ -236,10 +236,26 @@ all:
39326530663163353235323362643330393836343831383038353135363962643064656264373036
30353337323965326432393162373333313636363933653463353563636332303762363932633631
63316430396534663237
dst_opensea_token: !vault |
$ANSIBLE_VAULT;1.1;AES256
62653264633564316632613962323564353765303066626263643662343233336139333162363563
6661303434623766353738316430616430323462336437640a633137653732333738613438636131
35333666656432323030346162333437393831373530653063353035353937376165323565633931
6634356539626435360a393932303633636138633661373039643430626638666230626337633830
33623265633530343530643966623161633031666433356130363738343463303762613463653262
6138643764313463626530346137333063323538363131643163
covalent_token: !vault |
$ANSIBLE_VAULT;1.1;AES256
66333666363565343330326663323532633763653032643235343038303139613661343763306632
3633646138643134626237383137343065643161353161620a346134366263303662336361313136
33613137363534383031393462623431333633343164313131303565656133353366636464346231
6532613933633239650a323930353636313132623535386636336430306262336266323131343032
38626333636234613534646633656236633032393835626637333166343366333530326339373364
3764643361636337396264636431616232373863663134636134
scrape: 120s
arch: amd64
cache_version: v0.5.3
ticker_version: 3.10.3-beta.3
ticker_version: 3.10.6
extra_dst_args:
pull: false
dst_full: true
Expand Down Expand Up @@ -267,7 +283,9 @@ all:
t480:
ansible_host: 192.168.0.5
cornelius:
ansible_host: 192.168.0.6
ansible_host: 192.168.0.215
koda:
ansible_host: 192.168.0.215
oc:
vars:
ansible_user: ubuntu
Expand All @@ -277,12 +295,12 @@ all:
hosts:
oca8:
ansible_host: 129.153.144.225
oca9:
ansible_host: 129.158.255.22
oca10:
ansible_host: 129.158.237.210
oca11:
ansible_host: 129.158.243.254
#oca9:
# ansible_host: 129.158.255.22
#oca10:
# ansible_host: 129.158.237.210
#oca11:
# ansible_host: 129.158.243.254
oca1:
ansible_host: 129.153.217.210
oca0:
Expand Down Expand Up @@ -341,7 +359,7 @@ all:
# zippy: 8151
# con: 8152
# diogofromtheblock: 8153
jakemiddy: 8154
# jakemiddy: 8154
# darkedu: 8155
# nopal: 8156
dusk: 8157
Expand Down Expand Up @@ -401,7 +419,7 @@ all:
generalorochi: 8033
# sh eriff: 8034
nandobanando: 8035
justmoonshot: 8036
# justmoonshot: 8036
# erimyth: 8037
# vladelonbank: 8038
# sirhodlslong: 8039
Expand All @@ -412,6 +430,8 @@ all:
scytalex: 8044
quasi: 8045
kas: 8046
defikraken: 8047
klaudiuszeth: 8048
oca3:
ansible_host: 144.24.58.138
clients:
Expand All @@ -436,7 +456,7 @@ all:
# thedoctor: 8062
# glaucus: 8064
revutoadmin: 8065
bacon: 8067
# bacon: 8067
# ernesto50: 8068
# dunders: 8069
ronson: 8070
Expand All @@ -446,10 +466,10 @@ all:
smartsharks: 8078
wincenty: 8079
croissant: 8080
chadthundercock: 8081
# chadthundercock: 8081
cap: 8082
iwinned: 8083
launchpad: 8084
# launchpad: 8084
mac: 8085
ethwork: 8086
# theavgamer: 8087
Expand Down Expand Up @@ -563,9 +583,8 @@ all:
archaicalter: 8139
yunggod: 8140
elude: 8141
kraken: 8142
#kraken: 8142
oca6:
ticker_version: 3.10.3-beta.1
ansible_host: 144.24.63.75
clients:
# r0b1n: 8157
Expand Down
21 changes: 11 additions & 10 deletions playbooks/backup-cornelius.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
cmd: |
rclone copy riley: /bucket/backup/drive/
- name: backup photos
shell:
cmd: |
rclone sync /bucket/prism crypt:prism
# - name: backup photos
# shell:
# cmd: |
# rclone sync /bucket/prism crypt:prism

# - name: backup plex
# shell:
Expand All @@ -28,9 +28,10 @@
- name: backup media
shell:
cmd: |
rclone copy /bucket/media/vhs/ crypt:media/vhs/
rclone copy /bucket/media/books/ crypt:media/books/
rclone copy /bucket/media/music/ crypt:media/music/
# rclone copy /bucket/media/syndicated/ crypt:media/syndicated/
# rclone copy /bucket/media/movies/ crypt:media/movies/
# rclone copy /bucket/media/tv/ crypt:media/tv/
rclone copy /bucket/media/vhs/ crypt:media/vhs/
rclone copy /bucket/media/books/ crypt:media/books/
rclone copy /bucket/media/music/ crypt:media/music/
rclone copy -vP /bucket/media/syndicated/Survivor/ crypt:media/syndicated/
# rclone copy /bucket/media/syndicated/ crypt:media/syndicated/
# rclone copy /bucket/media/movies/ crypt:media/movies/
# rclone copy /bucket/media/tv/ crypt:media/tv/
48 changes: 27 additions & 21 deletions playbooks/discord-stock-ticker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

- name: Download dst
get_url:
url: "https://github.com/rssnyder/discord-stock-ticker/releases/download/{{ ticker_version }}/discord-stock-ticker_{{ ticker_version }}_linux_{{ arch }}.tar.gz"
url: "https://github.com/rssnyder/discord-stock-ticker/releases/download/v{{ ticker_version }}/discord-stock-ticker_{{ ticker_version }}_linux_{{ arch }}.tar.gz"
dest: "/etc/discord-stock-ticker-{{ ticker_version }}.tar.gz"
mode: '0700'

Expand Down Expand Up @@ -62,25 +62,6 @@
loop: "{{ clients | dict2items }}"
when: pull

- name: Start dst
systemd:
state: restarted
name: "{{ item.key }}.service"
daemon_reload: yes
loop: "{{ clients | dict2items }}"
# loop_control:
# pause: 3
when: client is not defined or item.key == client

# upgrade for 3.11.0
# - name: inject gas apiToken
# shell:
# cmd: |
# sqlite3 /etc/discord-stock-ticker/{{ item.key }}.state 'update gases set apiToken = "{{ zapper_token }}" where network = "binance-smart-chain"'
# sqlite3 /etc/discord-stock-ticker/{{ item.key }}.state 'update gases set apiToken = "{{ zapper_token }}" where network = "polygon"'
# loop: "{{ clients | dict2items }}"
# when: client is not defined or item.key == client

# - name: Start dst
# systemd:
# state: restarted
Expand All @@ -90,8 +71,33 @@
# loop_control:
# pause: 3
# when: client is not defined or item.key == client

# upgrade database
- name: inject gas apiToken
shell:
cmd: |
sqlite3 /etc/discord-stock-ticker/{{ item.key }}.state 'update holders set apiToken = "{{ covalent_token }}"'
loop: "{{ clients | dict2items }}"
when: client is not defined or item.key == client

- name: update frequency
shell:
cmd: |
sqlite3 /etc/discord-stock-ticker/{{ item.key }}.state 'update holders set frequency = 7200'
loop: "{{ clients | dict2items }}"
when: client is not defined or item.key == client

- name: Start dst
systemd:
state: restarted
name: "{{ item.key }}.service"
daemon_reload: yes
loop: "{{ clients | dict2items }}"
loop_control:
pause: 10
when: client is not defined or item.key == client

- name: restart journalctl
systemd:
state: restarted
name: systemd-journald
name: systemd-journald
5 changes: 5 additions & 0 deletions playbooks/dst_backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
pip:
name: boto3
when: clients

- name: Install cryptography
pip:
name: cryptography
when: clients

- name: Backup DB
amazon.aws.aws_s3:
Expand Down
5 changes: 3 additions & 2 deletions playbooks/dst_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@
# cmd: sqlite3 /etc/discord-stock-ticker/{{ item.key }}.state 'update tickers set currency = "AUD"'
# cmd: sqlite3 /etc/discord-stock-ticker/{{ item.key }}.state 'delete from tickers where id > 2'
# cmd: sqlite3 /etc/discord-stock-ticker/{{ item.key }}.state 'update gases set network = "matic"'
cmd: sqlite3 /etc/discord-stock-ticker/{{ item.key }}.state 'update tickers set decimals = 2 where name = "binancecoin"'
# cmd: sqlite3 /etc/discord-stock-ticker/{{ item.key }}.state 'update tickers set decimals = 2 where name = "goldenboys"'
# cmd: sqlite3 /etc/discord-stock-ticker/{{ item.key }}.state 'update marketcaps set ticker = "$MCAP" where name = "goldenboys"'
#
# cmd: sqlite3 /etc/discord-stock-ticker/{{ item.key }}.state 'update tickers set decorator = " "'
# cmd: sqlite3 /etc/discord-stock-ticker/{{ item.key }}.state 'update tickers set activity = "Coingecko API"'
# cmd: sqlite3 /etc/discord-stock-ticker/{{ item.key }}.state 'update tickers set decimals = 5 where name = "okidoki-social"'
cmd: sqlite3 /etc/discord-stock-ticker/{{ item.key }}.state 'update holders set apiToken = "cqt_rQtKPtgHFCY4FbXYvwJJ4bwkCdJp"'
loop: "{{ clients | dict2items }}"
when: item.key == client

Expand Down
18 changes: 11 additions & 7 deletions playbooks/templates/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ minecraft.rileysnyder.dev {
}

files.rileysnyder.dev {
reverse_proxy 192.168.0.6:8080
reverse_proxy 192.168.0.215:8080
basicauth * {
friend JDJhJDE0JExhTTFNVFhteVlhYXBZWTl4b0lwTXVtVDZ4a09VTkpDWVpTazZLV2tBN0x6NkN6RE1vNHJl
}
Expand All @@ -98,11 +98,11 @@ public.rileysnyder.dev {
}

requests.rileysnyder.org {
reverse_proxy 192.168.0.6:5055
reverse_proxy 192.168.0.215:5055
}

requests.rileysnyder.dev {
reverse_proxy 192.168.0.6:5055
reverse_proxy 192.168.0.215:5055
}

pushmetrics.rileysnyder.dev {
Expand All @@ -117,11 +117,11 @@ parson.tesla.rileysnyder.dev {
}

send.rileysnyder.dev {
reverse_proxy 192.168.0.6:8383
reverse_proxy 192.168.0.215:8383
}

vscode.rileysnyder.dev {
reverse_proxy 192.168.0.2:6969
reverse_proxy 192.168.0.3:6969
}

cds.rileysnyder.dev {
Expand All @@ -145,11 +145,15 @@ registry.rileysnyder.dev {
}

plex.rileysnyder.dev {
reverse_proxy 192.168.0.6:32400
reverse_proxy 192.168.0.215:32400
}

vhsarchive.rileysnyder.dev {
reverse_proxy 192.168.0.6:8096
reverse_proxy 192.168.0.215:8096
}

bothwellarchive.rileysnyder.dev {
reverse_proxy 192.168.0.215:8096
}

alexsnyder.net {
Expand Down
4 changes: 4 additions & 0 deletions playbooks/templates/authorized_keys
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCXs91O+wX/y8bDK0Kd4qLOCccnE/wmWPNi4SpVW3jI
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDLf1s1F9t2qMf2brMAB1CVXXK+SzC1GnIzauTZ3BH8RvqzcPmgBj/XyrmGHKSgrdhI8ddiK2Hwg6mD/OkR8Apkrp0zj2FPkSdtDeMX6cHWZ3bvEFMYC4OdHVxFH7gSLMC3szKqrcTCo1rmJnfwBux4YgNyGiwbVCMZUaQOAQqNVYa3hYN3AAHa+BbvqEBzUPkYpZoBK8FUwzn0i6jjKKW+mNrNJlevKUbegvGfoUNNL4Z4WosqB06R2ml5GYmo0xXcIpBkMDRGlWz+juS9qY2mb574vRI2u5ftFyJcWLRnNKgHRkogtnFHw0kUE3oUMsEeFQHYQDlZvpS2TC8MwzPBXJ4d49XqNL5Ic+wokWdShPOAG6sWTHEmgY/0dIwTYDi/4J8PfdWVMQbnqKe+d9Tlfc81JRR/Dgfpr5yqmAs5p+ghwcmopV4piRMkDx5mRnSSV/3UxF0xKwWzuKeXZK4DwZLxM3Sqx2Zw+ubad0+AFX24bkx67uJHHxMR5emRSO0= riley@charlie
#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3IR80wnzICi7WikaCFqJ5AM40a6Wo1UrVK4Ok= [email protected]
# nicole macbook
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQD4zUcxJdRLxEra1oYFEI8f1FQxXMMXNBD4uUP5SuaatyErlaVeVeQGzh51D6xxtOEeRw9l3o7j1or+IO7RhJ6+CdwhnytfGXbAiIwwdh7us1wI9zbODafGSmu1qmH/RM06SvbJcnMJZguziCdRzvWJC64sIteVFjCxyFnpd0EllQjXE5F3+otrJk2J2brySlhc6zaM6x8UtpR8jbi3vcSwe2v8Zlvh77Rmlc0vn67Xjg3v5sp0P+F0qJTppQqQkTERLFrrolSXDvnRdvzocbO1LRnEyiS+BmhNlZct3vTyzuxExgkPByaaybq8c8Ndlyp++4CriTPjWY6Ai/Dw9u802JlOIP/VI8ip6gKHqTbqACb2idEeiZ2PFXY0ZgXnGHZi87xnv4sVXAopYm/e4F/vgel3dXbUnRibu5m1DP7IJsJkcB37D6Bnmz6o/B2Qi5h7agLMYx92SlsSo5ynS53U6wyckBuLoRYRJcw2qMf6TqTyONL/r6lpMqi50FyKaSc= [email protected]
2 changes: 1 addition & 1 deletion playbooks/templates/homer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ services:
target: '_top'
- name: "Deluge"
logo: "assets/homer-icons/png/deluge.png"
url: "http://hurley:8112"
url: "http://cornelius:8112"
target: '_top'
- name: "Overseerr"
logo: "assets/homer-icons/png/overseerr.png"
Expand Down
40 changes: 22 additions & 18 deletions playbooks/templates/hurley_docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,24 +190,6 @@ services:
ports:
- 8911:8080

deluge:
image: linuxserver/deluge
container_name: deluge
restart: unless-stopped
environment:
PUID: 1000
PGID: 1000
TZ: America/Chicago
VPN_ENABLED: "no"
volumes:
- $APPDATA/deluge:/config
- /mnt/media/books:/downloads
ports:
- "8112:8112"
- "8118:8118"
- "58846:58846"
- "58946:58946"

discord-bot-manager:
build: $APPDATA/discord-bot-manager
container_name: discord-bot-manager
Expand Down Expand Up @@ -335,11 +317,33 @@ services:
volumes:
- $APPDATA/discord-reddit-posts:/db

proxy:
image: "harness/ff-proxy:latest"
environment:
DEBUG: "true"
ACCOUNT_IDENTIFIER: wlgELJ0TTre5aZhzpt8gVA
ORG_IDENTIFIER: default
ADMIN_SERVICE_TOKEN: ${HARNESS_PLATFORM_API_KEY}
AUTH_SECRET: ${HARNESS_PROXY_AUTH_SECRET}
REDIS_ADDRESS: redis:6379
API_KEYS: ${HARNESS_PROXY_API_KEYS}
volumes:
- proxy:/config
ports:
- 7000:${PORT:-7000}

redis:
image: "redis:latest"
ports:
- "6379:6379"

volumes:
db:
driver: local
registry:
driver: local
proxy:
driver: local
networks:
gotosocial:
ipam:
Expand Down
Loading

0 comments on commit 2058d13

Please sign in to comment.