Thanks, I tried this and working perfectly for me but when I update the java option using below, it will append the new line but if these lines are already existed then also make duplicate entries.
name: change tomcat parameters with the command line
win_command: Tomcat_WE.exe //US//Tomcat_WEw ++JvmOptions=“-Djavax.net.ssl.trustStore=D:\apps\Tomcat_WE\conf\bpstruststore.jks;-Djavax.net.ssl.trustStorePassword={{ pass }};-Dhttps.protocols=TLSv1.2”
args:
chdir: D:\apps\Tomcat_WE\bin\
If you store all the settings you need in your ansible playbook this is not a problem.
I like to have ansible be fully in charge of the configuration of applications. It makes it easier to know exactly what settings are applied if they are all in ansible and you don't have to check each individual machine as well as looking at the ansible configuration to see what seeings should be being used.