Some checks failed
Ansible Minecraft CI/CD Pipeline / Ansible Lint Check (push) Successful in 58s
Ansible Minecraft CI/CD Pipeline / Project Structure Validation (push) Failing after 3s
Ansible Minecraft CI/CD Pipeline / Security Scan (push) Successful in 4s
Ansible Minecraft CI/CD Pipeline / Deploy to Staging (push) Has been skipped
Ansible Minecraft CI/CD Pipeline / Deploy to Production (push) Has been skipped
Ansible Minecraft CI/CD Pipeline / Backup System Check (push) Has been skipped
32 lines
798 B
YAML
32 lines
798 B
YAML
---
|
|
- name: Install packages needed for MCRCON compilation
|
|
ansible.builtin.apt:
|
|
name:
|
|
- git
|
|
- build-essential
|
|
state: present
|
|
|
|
- name: Clone MCRCON repository
|
|
ansible.builtin.git:
|
|
repo: "https://github.com/Tiiffi/mcrcon.git"
|
|
dest: "{{ minecraft_tools_dir }}/mcrcon"
|
|
version: "v{{ mcrcon_version }}"
|
|
force: true
|
|
become_user: "{{ minecraft_user }}"
|
|
|
|
- name: Compile MCRCON
|
|
ansible.builtin.shell: |
|
|
cd {{ minecraft_tools_dir }}/mcrcon
|
|
make
|
|
become_user: "{{ minecraft_user }}"
|
|
args:
|
|
creates: "{{ minecraft_tools_dir }}/mcrcon/mcrcon"
|
|
|
|
- name: Install MCRCON binary
|
|
ansible.builtin.copy:
|
|
src: "{{ minecraft_tools_dir }}/mcrcon/mcrcon"
|
|
dest: "/usr/local/bin/mcrcon"
|
|
owner: root
|
|
group: root
|
|
mode: '0755'
|
|
remote_src: true |