cant run shell script with arguments

6 views
Skip to first unread message

visar

unread,
Nov 12, 2018, 1:04:59 PM11/12/18
to Ansible Project
Hello Experts.

i tried both command and shell module to execute the playbook for running my application setup. There i have to add some arguments with the script, as one input file as response.properties, and one application url and my domain credentials along with it. below is the playbook which i tried. But its giving error as given below..

playbook
________
---

- name: Run SETUP
  hosts: myhost
  tasks:
    -name: Commandline SETUP from Response file
     shell: /opt/IBM/server/repotools-jts.sh -setup repositoryURL=https://myurl:9443/jts responsefile=response.properties adminUserId=mydomainid adminPassword=password




Error
_____

[root@hostname]# ansible-playbook SETUP.yml
ERROR! Syntax Error while loading YAML.
  mapping values are not allowed in this context

The error appears to have been in '/etc/ansible/roles/IBM/tasks/SETUP.yml': line 7, column 11, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

    -name: Commandline SETUP from Response file
     shell: /opt/IBM/server/repotools-jts.sh -setup repositoryURL=https://myurl:9443/jts responsefile=response.properties adminUserId=mydomainid adminPassword=password
          ^ here

Reply all
Reply to author
Forward
0 new messages