From 5bd52ff6276d3451d5ba0d2b8860269e92e03ca4 Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Thu, 17 Oct 2024 14:33:02 -0400 Subject: [PATCH] change method for deploying and executing pvsqueeze.sh due to environmental issues --- bigboot_execute_resize.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/bigboot_execute_resize.yml b/bigboot_execute_resize.yml index 1274d3a..32d002b 100644 --- a/bigboot_execute_resize.yml +++ b/bigboot_execute_resize.yml @@ -35,8 +35,23 @@ when: - bigboot_data[inventory_hostname]['bigboot_execute_bigboot'] | bool block: - - name: Shift free extents to end of PV - ansible.builtin.script: "scripts/pvsqueeze.sh {{ bigboot_data[inventory_hostname]['bigboot_pv'] }}" + # Under normal circumstances we'd use this method, but unable to do + # so in certain environments so lets use copy/command instead + # - name: Shift free extents to end of PV + # ansible.builtin.script: "scripts/pvsqueeze.sh {{ bigboot_data[inventory_hostname]['bigboot_pv'] }}" + # register: bigboot_pvsqueeze + + - name: Copy script to host + ansible.builtin.copy: + src: scripts/pvsqueeze.sh + dest: /var/tmp/pvsqueeze.sh + owner: root + group: root + mode: '0700' + + - name: Shift free extents to end of PV via pvsqueeze.sh + ansible.builtin.command: + cmd: "/var/tmp/pvsqueeze.sh {{ bigboot_data[inventory_hostname]['bigboot_pv'] }}" register: bigboot_pvsqueeze - name: Expand the /boot partition as requested