~starkingdoms/starkingdoms

ref: 913ef14a9fc364d89d5bc067b6033f731ecd3ec4 starkingdoms/ansible/deploy.yml -rw-r--r-- 871 bytes
913ef14a — ghostlyzsh can no longer add two modules to one face 1 year, 11 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