How to push a template context into Ansible command

Viewed 16

I have to reproduce these steps with Ansible:

Backup: sshpass -p $PASSWORD ssh $USER@$IP save_configuration -p $PASSWORD> $FILE
Restore: cat $FILE | sshpass -p $PASSWORD ssh $USER@$IP restore_configuration -p $PASSWORD

For the 1st one, I could storage the dump. But for the 2nd one, is there any way to move that "cat" in a fancy way?

Thank you!

0 Answers
Related