Hello everybody, this is my first post here.

I have a playbook that includes these tasks:

- name: Staging directory exists
  file:
    path: "{{ staging_dir }}"
    recurse: yes
    state: directory


- name: "{{ java_package }} is present in staging directory"
  copy:
    src: "{{ java_package }}"
    dest: "{{ staging_dir }}/{{ java_package }}"


- name: "{{ java_package }} is installed"
  yum:
    name: "{{ staging_dir }}/{{ java_package }}"
    state: present

I would like to copy the file to the host only if needed, that is, the RPM 
in question is not already installed. Can I do this in Ansible?

Thanks!

Dan

-- 
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/92d3af4c-cd74-4a13-8cd9-584d5c9780a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to