31 lines
944 B
YAML
31 lines
944 B
YAML
---
|
|
- name: Sauvegarde avant mise à jour
|
|
ansible.builtin.command:
|
|
cmd: "{{ backup_script_path }}/minecraft-backup-daily.sh"
|
|
when: update_backup_before | default(true)
|
|
|
|
- name: Génération du script de changement de version
|
|
ansible.builtin.template:
|
|
src: version-switch.sh.j2
|
|
dest: "{{ update_script_path }}/minecraft-version-switch.sh"
|
|
owner: root
|
|
group: root
|
|
mode: '0755'
|
|
|
|
- name: Exécution du changement de version
|
|
ansible.builtin.command:
|
|
cmd: "{{ update_script_path }}/minecraft-version-switch.sh {{ minecraft_version }}"
|
|
notify: restart minecraft
|
|
|
|
- name: Mise à jour du fichier de version
|
|
ansible.builtin.copy:
|
|
content: "{{ minecraft_version }}"
|
|
dest: "{{ current_version_file }}"
|
|
owner: "{{ minecraft_user }}"
|
|
group: "{{ minecraft_group }}"
|
|
mode: '0644'
|
|
|
|
- name: Nettoyage du répertoire temporaire
|
|
ansible.builtin.file:
|
|
path: "{{ temp_build_dir }}"
|
|
state: absent |