If you are using the `command` module, this is because `command` doesn't
understand shell constructs such as `&`

You would need to use the `shell` module instead.

However, you are still likely to have issues with this.  The command will
still likely end before you expect.  I'd really recommend creating a real
service that can start and potentially monitor this command more
appropriately.

On Thu, May 19, 2016 at 12:16 PM, Aprameya NDS <[email protected]>
wrote:

> Hi,
>
> I have a traffic tool for which i have written a module with the required
> options which i send to be triggered through Ansible for execution.
>
> It goes this way:
>
> "/opt/medusa_labs/test_tools/bin/maim -b256k -Q8 -f/dev/sdc &"
>
> When executing on the host i get the following error: "*(program startup
> error)\n\nERROR: INIT: '&' is an unrecognized command line parameter\n"}*"
>
> Here '&' is being taken as an option rather than telling it to run as a
> background.  Manually running the same command on the host works fine.
>
> The reason for going with this approach is that Async and Poll when used,
> log files do not get created by the traffic tool and when run without this
> its a kind of infinite command which runs for ever.
>
> So can anyone please give some suggestions/ideas on the approach that can
> solve this?
>
> Regards
> Aprameya
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/e467807f-6d89-4e33-a216-adc73b7ac06c%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/e467807f-6d89-4e33-a216-adc73b7ac06c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Matt Martz
@sivel
sivel.net

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAD8N0v_N5YqN76BsWS-sQ__MpLZz7D7noKEcYKgzrKL_WmMcLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to