Open ben-ihelputech opened 1 year ago
So I did some more digging and I created a test playbook using just the code that is currently in use by the playbook. I hard coded the variables for my environment and ran the playbook:
---
- hosts:
- maas_postgres_primary
tasks:
- name: Create Temporary Unpack Directory
ansible.builtin.file:
path: /tmp/maas_backup/
owner: root
group: root
mode: '0755'
state: directory
- name: Unarchive file
ansible.builtin.unarchive:
src: /backups/postgres/pickme.tgz
dest: /tmp/maas_backup
become: yes
gather_facts: true
What I noticed when it was done is that it returned a gz file in the dest directory:
$ ls /tmp/maas_backup/
dump.sql.gz
So it seems to me that the reason the playbook fails is that ansible is not fully unarchiving the .tgz file and then expects there to be data in the {backup-dir}/etc/maas section.