# Replacing the existing Jar files with available Jar files and currently with same name available no action is taking

**URL:** <https://forum.ansible.com/t/replacing-the-existing-jar-files-with-available-jar-files-and-currently-with-same-name-available-no-action-is-taking/30233>\
**Category:** Ansible Project\
**Created:** [May 1, 2019, 8:22pm UTC](https://forum.ansible.com/t/replacing-the-existing-jar-files-with-available-jar-files-and-currently-with-same-name-available-no-action-is-taking/30233 "2019-05-01T20:22:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chandrasekhar\_Mallis](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@chandrasekhar\_Mallis](https://forum.ansible.com/u/chandrasekhar_Mallis)\
**Post date:** [May 1, 2019, 8:22pm UTC](https://forum.ansible.com/t/replacing-the-existing-jar-files-with-available-jar-files-and-currently-with-same-name-available-no-action-is-taking/30233/1 "2019-05-01T20:22:26Z")

</div>

Dear All.

Need your help we are in the process of Automating the cognos analytics servers from Linux env with ansible code .

Requirement : we have two Jar files named local\_policy.jar and US\_export\_policy.jar in our current installation directory …/ibm/jre/lib/security/ and we need to replace the new local\_policy.jar and US\_export\_policy.jar and we are writing the code as below .

Ansible code:

- name: Put Oracle drivers in cognos directory  
get\_url: \>  
url={{ artifactory\_url }}/libs-ibm-lic-local/com/oracle/ojdbc7/12.1.0.2.0/ojdbc7-12.1.0.2.0.jar  
dest={{ cognos\_dir }}/drivers/ojdbc7-12.1.0.2.0.jar  
owner=‘{{ cognos\_user }}’  
group=‘{{ cognos\_group }}’  
mode=0755  
become: yes

- name: Put US export policy file in cognos directory  
get\_url: \>  
url={{ artifactory\_url }}/libs-ibm-local/com/ibm/jce/US\_export\_policy/2013-02-27/US\_export\_policy-2013-02-27.jar  
dest={{ cognos\_dir }}/jre/lib/security/US\_export\_policy.jar  
owner=‘{{ cognos\_user }}’  
group=‘{{ cognos\_group }}’  
mode=0755  
become: yes

The above code is not taking any code or copying the new policy files since the { cognos\_dir }}/jre/lib/security/ has that files and if we change the name to US\_export\_policy\_1.jar we can see the file new file US\_export\_policy\_1.jar

we modified the above code by adding force:Yes not sure if this works or not

name: Put local policy file in cognos directory  
get\_url: \>  
url={{ artifactory\_url }}/libs-ibm-local/com/ibm/jce/local\_policy/2013-02-27/local\_policy-2013-02-27.jar  
dest={{ cognos\_dir }}/jre/lib/security/local\_policy.jar  
owner=‘{{ cognos\_user }}’  
group=‘{{ cognos\_group }}’  
mode=0755  
force: yes  
become: yes

Can any one suggest an exact approch to move furture

Thanks  
M.chandra

---

<div class="post-metadata">

**Author:** ![chandrasekhar\_Mallis](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@chandrasekhar\_Mallis](https://forum.ansible.com/u/chandrasekhar_Mallis)\
**Post date:** [May 2, 2019, 1:33am UTC](https://forum.ansible.com/t/replacing-the-existing-jar-files-with-available-jar-files-and-currently-with-same-name-available-no-action-is-taking/30233/2 "2019-05-02T01:33:13Z")

</div>



---

<div class="post-metadata">

**Author:** ![cassell](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@cassell](https://forum.ansible.com/u/cassell)\
**Post date:** [May 2, 2019, 2:04am UTC](https://forum.ansible.com/t/replacing-the-existing-jar-files-with-available-jar-files-and-currently-with-same-name-available-no-action-is-taking/30233/3 "2019-05-02T02:04:47Z")

</div>

Please stop the spam. Your message came thru the first time. Also, please don't spam individual members of the list with the same question you sent to the list.

Thanks.

R,  
James Cassell

---

<div class="post-metadata">

**Author:** ![chandrasekhar\_Mallis](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@chandrasekhar\_Mallis](https://forum.ansible.com/u/chandrasekhar_Mallis)\
**Post date:** [May 2, 2019, 3:32am UTC](https://forum.ansible.com/t/replacing-the-existing-jar-files-with-available-jar-files-and-currently-with-same-name-available-no-action-is-taking/30233/4 "2019-05-02T03:32:29Z")

</div>

Thanks for info…
