Hi,
- name: copy_phoenix_folder
win_copy:
src: phoenix_x86
when: “{{ ansible_architecture }} == 32-bit”
src: phoenix_x64
when: “{{ ansible_architecture }} == 64-bit”
dest: c:\
I have written above code but scr will always be set to phoenix_x64, giving below warning
[WARNING]: While constructing a mapping from /etc/ansible/roles/deepak_role/tasks/copy_phoenix_folder.yml, line 3, column 10, found a duplicate dict key (when). Using
last defined value only.
where phoenix_x86 and phoenix_x64 are the folders copied in files folder of role.
Please guide me so that the scr should be set to phoenix_x86 when ansible_architecture is “32-bit” and it should set to phoenix_x64 when ansible_architecture is “64-bit”
Thanks