Re: [ansible-devel] conditionally give value to src of win_copy

2019-06-13 Thread Ravikumar Wagh
Hello, Please try as below: - name: copy_phoenix_folder win_copy: src: "{{ phoenix_x86 if ansible_architecture == 32-bit else phoenix_x64 }}" dest: c:\\ On Tue, 11 Jun, 2019, 7:15 PM Brian Coca, wrote: > first, this conditional is wrong: > `when: "{{ ansible_architecture

Re: [ansible-devel] conditionally give value to src of win_copy

2019-06-11 Thread Brian Coca
first, this conditional is wrong: `when: "{{ ansible_architecture }} == 64-bit"` should be: `when: ansible_architecture == "64-bit" alos you can just do: src: "{{ (ansible_architecture == '32-bit')|ternary('phoenix_x86', 'phoenix_x64') }}" -- -- Brian Coca -- You received this

Re: [ansible-devel] conditionally give value to src of win_copy

2019-06-07 Thread Martin Krizek
I have not tested but you want to do something like the following: - set_fact win_copy_src_var: phoenix_x86 when: "{{ ansible_architecture }} == 32-bit" - set_fact win_copy_src_var: phoenix_x64 when: "{{ ansible_architecture }} == 64-bit" - name: copy_phoenix_folder win_copy:

[ansible-devel] conditionally give value to src of win_copy

2019-06-07 Thread Deepak Asawa
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,