syntax error while putting mapped values in arguments in ansible playbook

23 views
Skip to first unread message

visar

unread,
Nov 14, 2018, 2:42:44 AM11/14/18
to Ansible Project
Hello Experts,

Good Day!!

I was searching for some solution on my ansible playbook where i want run an application inbuilt .sh script with arguments and corresponding mapped values.

the below is the command which i can successfully execute in terminal window.

I tried with both shell and command and script modules in ansible, but no luck..

./repotools-jts.sh -setup repositoryURL=https://myappurl:9443/jts responsefile=response.properties adminUserId=mydomainID adminPassword=passwd

visar

unread,
Nov 14, 2018, 5:54:57 AM11/14/18
to Ansible Project
the below is the playbook which I tried here .
________________________________________________________________________________________________________
---

- name: Run JTS SETUP
  hosts: IHS
  tasks:
    - name: Commandline JTS SETUP from Response file
      script: /opt/IBM/605CLM/JazzTeamServer/server/repotools-jts.sh -setup repositoryURL=https://myappurl:9443/jts parametersFile=/opt/IBM/605CLM/JazzTeamServer/server/response_lat.properties adminUserId=mydomainid adminPassword=mypassword

____________________________________________________________________________________________________________

and the below is the error..

fatal: [10.70.3.6]: FAILED! => {"changed": true, "msg": "non-zero return code", "rc": 1, "stderr": "Shared connection to 10.170.3.9 closed.\r\n", "stderr_lines": ["Shared connection to 10.170.3.9 closed."], "stdout": "ERROR: Could not find configuration directory /root/.ansible/tmp/ansible-tmp-1542230980.95-221589976350574/conf/jts/provision_profiles. If you have moved or renamed your configuration directory, you can use the environment variable JAZZ_PROVISION_PROFILES to point to its new location.\r\n", "stdout_lines": ["ERROR: Could not find configuration directory /root/.ansible/tmp/ansible-tmp-1542230980.95-221589976350574/conf/jts/provision_profiles. If you have moved or renamed your configuration directory, you can use the environment variable JAZZ_PROVISION_PROFILES to point to its new location."]}

tried with command module and resulted a long error..

ameya agashe

unread,
Nov 14, 2018, 7:06:29 AM11/14/18
to ansible...@googlegroups.com
Check the path of properties file on the target server, it appears to me that it is not able to find the path of the property file.

Running with -vvv option would help.

Kind Regards,
Ameya Agashe

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9e7429aa-6436-458f-b4e8-ff1b89fcbf0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

vivek vijayan

unread,
Nov 14, 2018, 7:29:07 AM11/14/18
to ansible...@googlegroups.com
The same thing I could run locally and it is running successfully

Reply all
Reply to author
Forward
0 new messages