Good evening,
Hoping someone else has come across this issue/knows of a simple solution. I’ve attempted all variants of echo “Y/y”, using yes | wp ai1wm, etc… Nothing seems to work.
I’ve tested that running the command as-is does run successfully if run manually within vagrant (in the same directory the build step runs from):
- name: Restore from latest backup with All-in-One WP Migration
command: echo ‘y’ | wp ai1wm restore development-btraill-test-wp-20240324-130438-zee8xf.wpress
args:
chdir: “{{ deploy_helper.new_release_path }}/web/app/ai1wm-backups/”
Any ideas how to get the Ansible build-after.yml to run the following command?
wp ai1wm restore development-btraill-test-wp-20240324-130438-zee8xf.wpress
Command output:
wp ai1wm restore development-btraill-test-wp-20240324-130438-zee8xf.wpress
Restore in progress…
The import process will overwrite your website including the database, media, plugins, and themes. Are you sure to proceed? [y/n]
I hit y and the command processes for about 30-45seconds:
Success: Restore complete.
When I run it via the build-after.yml:
TASK [deploy : Restore from latest backup with All-in-One WP Migration] ********
changed: [redacted]
Running the command via build-after.yml takes maybe half of the time – which indicates it’s not completing. (I see no changes)
One additional note: If I use yes | wp ai1wm restore – it seems to just hang and never return.
Am I missing something easy? I have verified the file exists on the server in the directory path that {{ deploy_helper.new_release_path }}/web/app/ai1wm-backups/ resolves to.