How to unarchive a tar file locally and extract a deb package locally

35 views
Skip to first unread message

txa...@marketshare.com

unread,
Mar 31, 2015, 11:01:02 AM3/31/15
to ansible...@googlegroups.com
Hi Team,

 Can you please help me out to extract a tar file locally which contains a .deb file and then need to extract the .deb file and then copy to destiny(remote machine). 


ansimanager@ip-10-157-85-102:/var/lib/awx/projects/optimizer_deployment/content$ tar -tf optimizerappl-5.5.1-rel-12.tar
optimizerappl.msdlca_5.5.1-rel-12_all.deb



Many Thanks
Thomas Xavier


Toshio Kuratomi

unread,
Apr 1, 2015, 1:23:05 PM4/1/15
to ansible...@googlegroups.com
Maybe something like this:

---
- hosts: REMOTEMACHINE
tasks:
- unarchive:
src: /LOCAL/PATH/TO/optimizerappl-5.5.1-rel-12.tar
dest: /var/tmp/
copy: False
delegate_to: localhost
- copy:
src: /var/tmp/optimizerappl.msdlca_5.5.1-rel-12_all.deb
dest: /var/tmp/
- apt:
deb: /var/tmp/optimizerappl.msdlca_5.5.1-rel-12_all.deb
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/a088835f-a2ea-4c4c-a39f-9da815dddf88%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages