Chore: Updated bake pies to current services
This commit is contained in:
parent
cb3657615a
commit
e8a33cd80e
@ -49,25 +49,25 @@
|
|||||||
owner: pi
|
owner: pi
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
- name: Check Peitho public key
|
- name: Check Terminus public key
|
||||||
shell: "grep -c \"{{ peitho_key }}\" /home/pi/.ssh/authorized_keys || true"
|
shell: "grep -c \"{{ terminus_key }}\" /home/pi/.ssh/authorized_keys || true"
|
||||||
register: peithokey_test
|
register: terminuskey_test
|
||||||
|
|
||||||
- name: Add Peitho public key
|
- name: Add Terminus public key
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /home/pi/.ssh/authorized_keys
|
dest: /home/pi/.ssh/authorized_keys
|
||||||
line: "{{ peitho_key }}"
|
line: "{{ terminus_key }}"
|
||||||
when: peithokey_test.stdout == "0"
|
when: terminuskey_test.stdout == "0"
|
||||||
|
|
||||||
- name: Check Beacon public key
|
- name: Check rohan public key
|
||||||
shell: "grep -c \"{{ beacon_key }}\" /home/pi/.ssh/authorized_keys || true"
|
shell: "grep -c \"{{ rohan_key }}\" /home/pi/.ssh/authorized_keys || true"
|
||||||
register: beaconkey_test
|
register: rohankey_test
|
||||||
|
|
||||||
- name: Add Knox public key
|
- name: Add Rohan public key
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /home/pi/.ssh/authorized_keys
|
dest: /home/pi/.ssh/authorized_keys
|
||||||
line: "{{ beacon_key }}"
|
line: "{{ rohan_key }}"
|
||||||
when: beaconkey_test.stdout == "0"
|
when: rohankey_test.stdout == "0"
|
||||||
|
|
||||||
- name: Check Buttercup public key
|
- name: Check Buttercup public key
|
||||||
shell: "grep -c \"{{ buttercup_key }}\" /home/pi/.ssh/authorized_keys || true"
|
shell: "grep -c \"{{ buttercup_key }}\" /home/pi/.ssh/authorized_keys || true"
|
||||||
@ -105,9 +105,9 @@
|
|||||||
owner: pi
|
owner: pi
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
- name: Check if rsa key exists
|
- name: Check if ed25519 key exists
|
||||||
stat:
|
stat:
|
||||||
path: /home/pi/.ssh/id_rsa
|
path: /home/pi/.ssh/id_ed25519
|
||||||
register: key_status
|
register: key_status
|
||||||
|
|
||||||
- name: No need to generate new rsa key
|
- name: No need to generate new rsa key
|
||||||
@ -115,11 +115,11 @@
|
|||||||
debug:
|
debug:
|
||||||
msg: No need to generate new rsa key as it already exists.
|
msg: No need to generate new rsa key as it already exists.
|
||||||
|
|
||||||
- name: Generate new rsa key
|
- name: Generate new id_ed25519 key
|
||||||
when: key_status.stat.exists == false
|
when: key_status.stat.exists == false
|
||||||
become: yes
|
become: yes
|
||||||
become_user: pi
|
become_user: pi
|
||||||
shell: ssh-keygen -t rsa -b 4096 -q -f /home/pi/.ssh/id_rsa -C "pi@{{ hostname }} $(date '+%Y.%m.%d')" -N ""
|
shell: ssh-keygen -t id_ed25519 -q -f /home/pi/.ssh/id_ed25519 -C "pi@{{ hostname }} $(date '+%Y.%m.%d')" -N ""
|
||||||
|
|
||||||
- name: Install Docker
|
- name: Install Docker
|
||||||
shell: curl -sSL https://get.docker.com | sh
|
shell: curl -sSL https://get.docker.com | sh
|
||||||
@ -146,21 +146,21 @@
|
|||||||
groups: lp
|
groups: lp
|
||||||
append: yes
|
append: yes
|
||||||
|
|
||||||
- name: install beacon-redis-tunnel systemd unit file
|
- name: install rohan-redis-tunnel systemd unit file
|
||||||
template:
|
template:
|
||||||
src: "files/beacon-redis-tunnel.service"
|
src: "files/rohan-redis-tunnel.service"
|
||||||
dest: "/etc/systemd/system/beacon-redis-tunnel.service"
|
dest: "/etc/systemd/system/rohan-redis-tunnel.service"
|
||||||
|
|
||||||
- name: enable service beacon-redis-tunnel and ensure it is not masked
|
- name: enable service rohan-redis-tunnel and ensure it is not masked
|
||||||
systemd:
|
systemd:
|
||||||
name: beacon-redis-tunnel
|
name: rohan-redis-tunnel
|
||||||
enabled: yes
|
enabled: yes
|
||||||
masked: no
|
masked: no
|
||||||
|
|
||||||
- name: Make sure beacon-redis-tunnel service is running
|
- name: Make sure rohan-redis-tunnel service is running
|
||||||
systemd:
|
systemd:
|
||||||
state: started
|
state: started
|
||||||
name: beacon-redis-tunnel
|
name: rohan-redis-tunnel
|
||||||
|
|
||||||
- name: install leardal systemd unit file
|
- name: install leardal systemd unit file
|
||||||
template:
|
template:
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Frank container service
|
Description=Frank container service
|
||||||
After=docker.service beacon-redis-tunnel.service
|
After=docker.service rohan-redis-tunnel.service
|
||||||
Wants=network-online.target docker.socket beacon-redis-tunnel.service
|
Wants=network-online.target docker.socket rohan-redis-tunnel.service
|
||||||
Requires=docker.socket beacon-redis-tunnel.service
|
Requires=docker.socket rohan-redis-tunnel.service
|
||||||
PartOf=beacon-redis-tunnel.service
|
PartOf=rohan-redis-tunnel.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Restart=always
|
Restart=always
|
||||||
|
RestartSec=3
|
||||||
ExecStart=/usr/bin/docker start -a frank
|
ExecStart=/usr/bin/docker start -a frank
|
||||||
ExecStop=/usr/bin/docker stop -t 10 frank
|
ExecStop=/usr/bin/docker stop -t 10 frank
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ After=network.target
|
|||||||
Type=simple
|
Type=simple
|
||||||
User=pi
|
User=pi
|
||||||
|
|
||||||
ExecStart=/usr/bin/ssh -NTg -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no -i /home/pi/.ssh/id_rsa -R {{ ssh_port }}:localhost:22 tanshu@beacon.tanshu.com
|
ExecStart=/usr/bin/ssh -NTg -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no -i /home/pi/.ssh/id_ed25519 -R {{ ssh_port }}:localhost:22 tanshu@rohan.tanshu.com
|
||||||
|
|
||||||
# Restart every >2 seconds to avoid StartLimitInterval failure
|
# Restart every >2 seconds to avoid StartLimitInterval failure
|
||||||
Restart=always
|
Restart=always
|
||||||
|
@ -5,7 +5,7 @@ After=network.target
|
|||||||
[Service]
|
[Service]
|
||||||
User=pi
|
User=pi
|
||||||
|
|
||||||
ExecStart=/usr/bin/ssh -NT -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no -i /home/pi/.ssh/id_rsa -L 6379:localhost:6379 tanshu@beacon.tanshu.com
|
ExecStart=/usr/bin/ssh -NT -o ServerAliveInterval=30 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=2 -o StrictHostKeyChecking=no -i /home/pi/.ssh/id_ed25519 -L 6379:localhost:6379 tanshu@rohan.tanshu.com
|
||||||
|
|
||||||
# Restart every >2 seconds to avoid StartLimitInterval failure
|
# Restart every >2 seconds to avoid StartLimitInterval failure
|
||||||
RestartSec=5
|
RestartSec=5
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
hostname: "pkl3"
|
hostname: "pkl3"
|
||||||
ssh_port: "22243"
|
ssh_port: "22243"
|
||||||
peitho_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCrT4geK0hUTc/3NDVt0g3DZwdOg2dRq4MbNdVvmRVsJHXRXWkyehzDVTRmxxmUvPZgy20QgLcMVJWQ1128ksg7tYNcVRw7/8kV9xMmVFeHGc03H+8WltUuDrbcM5ejaIFvYgZvZpl1A7uuE8VOT6Z0LentV7VSKpmhrRsnYw3+parmjCLWSoW6HLj6L841OlF+4u07fPj92qXonqufeWvh5Fr2RF+uBkDv3Bk+Lk7ENa0GLt9zu/5zVZGynXpCIRwltxCFkLoFYEzXYxT4jGWSxZQmLizm08RFfQGlrbYx/3qUomF/A7cgpkPo8kOq4iXtc+1+1GZNKhg8356yeQonUdbZ9hUfEfgyHRGRx9x5cq588XKYy7VsYDp/08ZYB0RvvGvO4fVzmVUwrTwxQXJaKkqTMdkee11JAaD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65t2ft3vbVuTVR16gbwAI4A/iKvktKbQuo36/QhCcR2bE0/mOas1Dm/sM9w== tanshu@beacon 2022.01.03"
|
rohan_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKk6HHpwGQTfciXFaKOBWg+zh09XtTYvYxFZaaW3yMln tanshu@rohan 2023.08.06"
|
||||||
buttercup_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDfXd0bEU7vJFA+IA+Bdwfh/hTqSvi3JjPhHGxBr0i8/HgE4cww89GqNgY21vjxWgOv9BgBBhKndVTOzeY3FKI5p67JRvMoRSQAzFXBtiMCIHbtFqeWV7u0smcHT59c6ROAk8Gep8+XSRKHvN0Vwcm21BZBh8jb4PXG7AIXwlL1ovopgIzO50qg1a5sAIW8uTWMLHDGiOdgwet1qj55sYoO1XxPRJxk/aD9QVTYl1/wGo912bI/HN7z6DudqLVaZubJXF9Svsas8BO28h9Qn+IH4/mVqeB56AE3NrrCEsCyMFccZgG9YYIvGx8/OxWd0TjjqGq7P0SfuQ/xZGVBwFFJe8QC0Y8BZHyHx5fzSFxqZ756ue7BjHrdqS6HtCPZk9kQqo0xmGOum1WknonVT6to11mcsZE9lMeoLbpJnmNbKJp1YW1yTJJs8kB56BJQ8pRm4A+hbHjJPYScJVOf5aX39aDaszGBbqxCC525D6blQ9TGNBEY7xGzC00MORZ7FFlQI8Hu+uwmzcMNa5QWbKnFn/QwvnnpKi6inuZDQ7LZzSFjqZf/mF7BALYQ86Fj0oD2iJS6V03Mjqvc7L2rYEY60LZuhtx8h+T/KIvoNUemBr4OOgjdX3RQaeoI8pUbKr2cy9HALiGtt4sCuM9dLL6jTKpVBxks7rv1CvYqqE8/tw== tanshu@buttercup 2020.05.26"
|
buttercup_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDfXd0bEU7vJFA+IA+Bdwfh/hTqSvi3JjPhHGxBr0i8/HgE4cww89GqNgY21vjxWgOv9BgBBhKndVTOzeY3FKI5p67JRvMoRSQAzFXBtiMCIHbtFqeWV7u0smcHT59c6ROAk8Gep8+XSRKHvN0Vwcm21BZBh8jb4PXG7AIXwlL1ovopgIzO50qg1a5sAIW8uTWMLHDGiOdgwet1qj55sYoO1XxPRJxk/aD9QVTYl1/wGo912bI/HN7z6DudqLVaZubJXF9Svsas8BO28h9Qn+IH4/mVqeB56AE3NrrCEsCyMFccZgG9YYIvGx8/OxWd0TjjqGq7P0SfuQ/xZGVBwFFJe8QC0Y8BZHyHx5fzSFxqZ756ue7BjHrdqS6HtCPZk9kQqo0xmGOum1WknonVT6to11mcsZE9lMeoLbpJnmNbKJp1YW1yTJJs8kB56BJQ8pRm4A+hbHjJPYScJVOf5aX39aDaszGBbqxCC525D6blQ9TGNBEY7xGzC00MORZ7FFlQI8Hu+uwmzcMNa5QWbKnFn/QwvnnpKi6inuZDQ7LZzSFjqZf/mF7BALYQ86Fj0oD2iJS6V03Mjqvc7L2rYEY60LZuhtx8h+T/KIvoNUemBr4OOgjdX3RQaeoI8pUbKr2cy9HALiGtt4sCuM9dLL6jTKpVBxks7rv1CvYqqE8/tw== tanshu@buttercup 2020.05.26"
|
||||||
|
Loading…
Reference in New Issue
Block a user