When creating a loopback image of eve_recovery_image, kpartx -av can create a device whose loopback id contains two digits. This causes the regular expression Ansible uses (loop[0-9]p3) to fail to find a match in the stdout of kpartx. The solution is to match for any number of digits greater than or equal to 1 e.g., loop11p3, using the regexp: (loop[0-9]+p3)
When creating a loopback image of eve_recovery_image, kpartx -av can create a device whose loopback id contains two digits. This causes the regular expression Ansible uses (loop[0-9]p3) to fail to find a match in the stdout of kpartx. The solution is to match for any number of digits greater than or equal to 1 e.g., loop11p3, using the regexp: (loop[0-9]+p3)
`` diff --git a/ansible/roles/eve-recovery-files/tasks/main.yml b/ansible/roles/eve-recovery-files/tasks/main.yml index eb8f863..8debc75 100644 --- a/ansible/roles/eve-recovery-files/tasks/main.yml +++ b/ansible/roles/eve-recovery-files/tasks/main.yml @@ -35,7 +35,7 @@ set_fact: mapper_device: "{{ kpartx_output.stdout | regex_search(regexp, '\1') | first }}" vars:
regexp: '(loop[0-9]+p3)'