xmr-remote-nodes/tools/ansible/deploy-server.example.yml
ditatompel 0f7029b939
Update deployment example (CPU arch aware) #3
The ansible playbook is now using ansible_facts to determinate target
server or prober CPU architecture. The final "production" binary name
and changed to just simply "xmr-nodes-{client,server}".
2024-05-18 18:09:36 +07:00

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']