mirror of
https://github.com/ditatompel/xmr-remote-nodes.git
synced 2024-11-16 17:07:36 +00:00
5fae3d565a
The `tools` directory contains example ansible playbook, systemd example, and Nginx configuration example for the server. The directory name `deployment` for that stuffs much more suitable.
34 lines
1 KiB
YAML
34 lines
1 KiB
YAML
---
|
|
- name: Deploy and Restart Services
|
|
hosts: all
|
|
become: true
|
|
tasks:
|
|
- name: Stop server systemd daemon
|
|
systemd:
|
|
name: xmr-nodes-server.service
|
|
state: stopped
|
|
when: inventory_hostname in groups['server']
|
|
|
|
- name: Upload binary file (AMD64)
|
|
copy:
|
|
src: ../../bin/xmr-nodes-server-linux-amd64
|
|
dest: /path/to/remote/server/bin/xmr-nodes-server
|
|
Owner: your_user
|
|
Group: your_group
|
|
mode: 0755
|
|
when: inventory_hostname in groups['server'] and ansible_facts['architecture'] == 'x86_64'
|
|
|
|
- name: Upload binary file (ARM64)
|
|
copy:
|
|
src: ../../bin/xmr-nodes-server-linux-arm64
|
|
dest: /path/to/remote/server/bin/xmr-nodes-server
|
|
Owner: your_user
|
|
Group: your_group
|
|
mode: 0755
|
|
when: inventory_hostname in groups['server'] and ansible_facts['architecture'] == 'aarch64'
|
|
|
|
- name: Start systemd daemon
|
|
systemd:
|
|
name: xmr-nodes-server.service
|
|
state: started
|
|
when: inventory_hostname in groups['server']
|