Ansible Command Module Error

31 views
Skip to first unread message

Shyam Yenna

unread,
Mar 14, 2017, 3:18:37 PM3/14/17
to Ansible Project
I am encountering issues while trying to execute below task in a playbook.

- name:         Setup OpenDJ
  command:      "setup --cli --propertiesFilePath /tmp/opendjsetup.props --no-prompt"
  args:
    chdir:      "{{ install_dir }}/opendj"
#    creates:   "{{ install_dir }}/opendj/config"
  ignore_errors: yes


where install_dir=/opt

Error i am encountering is below. Any help is really appreciated.

Auto Generated Inline Image 1

Kai Stian Olstad

unread,
Mar 14, 2017, 3:35:10 PM3/14/17
to ansible...@googlegroups.com
Command module can't find setup, in PATH.
I guess you are trying to run the setup command in /opt/opendj ?
In that case add it should be commad: "{{ install_dir }}/opendj/setup
........

--
Kai Stian Olstad

Shyam Yenna

unread,
Mar 14, 2017, 4:37:46 PM3/14/17
to Ansible Project, ansible-pr...@olstad.com
I have tried that one but no luck. Still it throws different error

"changed": true,
    "cmd": [
        "/opt/opendj/setup",
        "--cli",
        "--propertiesFilePath",
        "/tmp/opendjsetup.props",
        "--no-prompt"
    ],
    "delta": "0:00:02.185983",
    "end": "2017-03-14 20:27:04.226508",
    "failed": true,
    "invocation": {
        "module_args": {
            "_raw_params": "/opt/opendj/setup --cli --propertiesFilePath /tmp/opendjsetup.props --no-prompt",
            "_uses_shell": false,
            "chdir": "/opt/opendj",
            "creates": null,
            "executable": null,
            "removes": null,
            "warn": true
        },
        "module_name": "command"
    },
    "rc": 7,
    "start": "2017-03-14 20:27:02.040525",
    "stderr": "",
    "stdout": "",
    "stdout_lines": [],
    "warnings": []
Reply all
Reply to author
Forward
0 new messages