Hi -
This is driving me crazy.
If I run this, ansible honors the “creates” and properly skips if the specified directory exists.
- name: copy and unpack form2
unarchive: >
src={{ jdks_available[item.jdk_ver][‘java_archive’] }}
dest={{ jdk_install_dir }}/
copy=yes
creates={{ jdk_install_dir }}/{{ jdks_available[item.jdk_ver][‘java_dir’] }}
with_items: jdks
If I run this, ansible seems to ignore “creates” and ALWAYS performs the unarchive. In vv output I see it doing a recursive analysis of all files in the target dir and sees ownership is different, whereas in “form2” above it does not.
- name: copy and unpack form1
unarchive:
src: “{{ jdks_available[item.jdk_ver][‘java_archive’] }}”
dest: “{{ jdk_install_dir }}/”
copy: yes
creates: “{{ jdk_install_dir }}/{{ jdks_available[item.jdk_ver][‘java_dir’] }}”
with_items: jdks
[ansible@test-ansible tasks]$ ansible --version
ansible 1.8.2
configured module search path = None
Any ideas?