packaging is better, but a quick and dirty play:

- shell: ls  myjar -*-assembly.jar
  register: existingjars

- copy: newjar dest=
   register: jarchanged

# or this can also be a handler, change register:jarchanged to notify
- file: path={{item}} state=absent
   with_items: existingjars
   when: jarchanged.changed


-- 
Brian Coca
Stultorum infinitus est numerus
0110000101110010011001010110111000100111011101000010000001111001011011110111010100100000011100110110110101100001011100100111010000100001
Pedo mellon a minno

-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to