Shell Module Code Not Executing

Hi Team,

Need you help on below issue

I am facing issue where code inside shell module is not getting executed over some remote server, ansible just passing the got without executing without any error,

That’s almost zero information.
Provide a full playbook and any other relevant information.

Hi

Below is the piece of code I am trying to execute, it is running fine over 500 nodes but there are some hosts in different environments where ansible not executing the code inside the shell module
just passing the code without any error/output

Hi

Below is the piece of code I am trying to execute, it is running fine over 500 nodes but there are some hosts in different environments where ansible not executing the code inside the shell module

Problems with arbitrary shell scripts is not related to Ansible IMHO.

Regards
           Racke

My two cents: if you have pretty much the whole action you want as part of a already existent shell script who runs smoothly, maybe the best approach is to:

  1. Copy script to remote managed server
  2. Run script remotely using “shell” module.

Off course this is a lame use of ansible, but trying to embeed a full script into a single call for the shell module will be probably a bigger pain.

Eventually in time you can try to replace some of the shell steps with native ansible call to make a good use of it.