diff --git a/playbooks/ci_restore_snapshot.yaml b/playbooks/ci_restore_snapshot.yaml index 6c17020eb..b512581cb 100644 --- a/playbooks/ci_restore_snapshot.yaml +++ b/playbooks/ci_restore_snapshot.yaml @@ -4,9 +4,11 @@ # This playbook rollback in the CI to the initiale state using LVM --- - name: Rollback to the initiale state + gather_facts: true hosts: cluster_machines become: true tasks: + - include_vars: "../vars/{{ ansible_distribution | replace(' ', '_') }}_paths.yml" - name: "grub conf" lineinfile: dest: /etc/default/grub @@ -19,7 +21,7 @@ - efi=runtime - "{{ grub_append | default([]) }}" - name: Update grub - command: update-grub + command: "{{ grub_update_command }}" - name: Merge lvm snapshot command: cmd: lvconvert --merge vg1/root-snap diff --git a/vars/CentOS_paths.yml b/vars/CentOS_paths.yml index 6f4694ff4..f5900385e 100644 --- a/vars/CentOS_paths.yml +++ b/vars/CentOS_paths.yml @@ -12,3 +12,4 @@ snmp_sudoers_path: "../src/centos/sudoers/Centos-snmp.j2" crm_command_path: "/usr/local/bin/crm" cukinia_command_path: "/usr/local/bin/cukinia" setup_ovs_command_path: "/usr/local/bin/setup_ovs.py" +grub_update_command: "grub2-mkconfig -o /boot/grub2/grub.cfg" diff --git a/vars/Debian_paths.yml b/vars/Debian_paths.yml index 37007ed25..20fecd593 100644 --- a/vars/Debian_paths.yml +++ b/vars/Debian_paths.yml @@ -12,3 +12,5 @@ snmp_sudoers_path: "../src/debian/sudoers/Debian-snmp.j2" crm_command_path: "crm" cukinia_command_path: "cukinia" setup_ovs_command_path: "setup_ovs.py" + +grub_update_command: "update-grub" diff --git a/vars/Seapath_host_Yocto_distribution_paths.yml b/vars/Seapath_host_Yocto_distribution_paths.yml index 689f0d6c8..1edaf71cc 100644 --- a/vars/Seapath_host_Yocto_distribution_paths.yml +++ b/vars/Seapath_host_Yocto_distribution_paths.yml @@ -9,3 +9,5 @@ service_name_chrony: "chronyd" crm_command_path: "/usr/bin/crm" cukinia_command_path: "/usr/sbin/cukinia" setup_ovs_command_path: "/usr/bin/setup_ovs.py" + +grub_update_command: "update-grub"