Hello - I'm seeking some assistance in unpackaging a tarball using Ansible.

I'm using the unarchive module to unpackage a tarball to a remote server. 
The tarball is stored localled on the Ansible server, and I want it 
extracted on the target server. 

*Code Snippet:*
- name: Prepare variables for WM dal_SDN180.tar changes
  set_fact:
    filename="dal_SDN180.tar"
    ma_app="WM"


- name: Deploy file to target
# Unzip using Ansible unarchive module
  tags: deploy
  unarchive:
    src: "{{ filename }}"
    dest: "{{ WMS_HOME }}/swtools/"
  register: deployed_copy_output
 
*-vvv output:*

> ok: [ptl01a0fap006] => {"changed": false, "dest": 
> "/apps/scope/manh/WM/swtools/", "gid": 2345, "group": "g_wmspt", "handler": 
> "TarArchive", "invocation": {"module_args": {"backup": null, "content": 
> null, "copy": true, "creates": null, "delimiter": null, "dest": 
> "/apps/scope/manh/WM/swtools/", "directory_mode": null, "exclude": [], 
> "extra_opts": [], "follow": false, "force": null, "group": null, 
> "keep_newer": false, "list_files": false, "mode": null, 
> "original_basename": "dal_SDN180.tar", "owner": null, "regexp": null, 
> "remote_src": null, "selevel": null, "serole": null, "setype": null, 
> "seuser": null, "src": 
> "/tmp/wmspt/ansible-tmp/ansible-tmp-1482960921.89-105630081213776/source"}}, 
> "mode": "0755", "owner": "wmspt", "secontext": 
> "unconfined_u:object_r:unlabeled_t:s0", "size": 4096, "src": 
> "/tmp/wmspt/ansible-tmp/ansible-tmp-1482960921.89-105630081213776/source", 
> "state": "directory", "uid": 3267}



When run, the play considers the task "ok" even though I know the tar file 
has different contents than the target. The tar file contains the same 
files, but the contents of those file is different. I would expect Ansible 
to nptice this and then extract the tarball. I'm able to see this behavior 
with zip files, but not tar files. I did notice that if I manually delete 
one of the files on the target server, Ansible then extracts the entire 
tarball. Manually reverting a file and rerunning Ansible still does not 
extract the tarball.

Any thoughts on what I am missing here? I reviewed this thread 
<https://github.com/ansible/ansible-modules-core/issues/2936> and tried 
setting pipelining to False, but it still had the same behavior.

Thanks 

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7b97b7ce-aef5-453e-89ab-37d6556112a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to