~starkingdoms/starkingdoms

ref: c3fe42cd30f754422dbf2ea3a9919031f5a9299c starkingdoms/ansible/deploy.yml -rw-r--r-- 871 bytes
c3fe42cd — ghostlyzsh ship editor saving finished, but no api server 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
- name: Deploy game servers
  hosts: gameservers
  connection: ssh
  tasks:
    - name: Ensure host connectivity
      ansible.builtin.ping:
    - name: Stop game server
      ansible.builtin.command:
        cmd: sv stop starkingdoms
      become: true
    - name: Download new game server file
      ansible.builtin.get_url:
        url: "{{ server_binary_url }}"
        dest: /opt/starkingdoms/starkingdoms-server
        mode: '0777'
    - name: Remove old client assets
      ansible.builtin.shell:
        cmd: rm -rf assets
        chdir: /opt/starkingdoms/client/
    - name: Download and unpack client package
      ansible.builtin.unarchive:
        src: "{{ client_package_url }}"
        dest: /opt/starkingdoms/client/
        remote_src: yes
    - name: Start game server
      ansible.builtin.command:
        cmd: sv start starkingdoms
      become: true