title: ansible playbook is failing
body: <p>part of playbook is given below:This is the ansible playbook(main.yml)</p>
  
  <pre><code>         - name: setting Info data
             set_fact:
               application_data:
                  log_file_name: "{{ log_file_name }}"
                  log_file_dir: "{{ log_file_dir }}"
  
           - name: call application
             custom_application:
                 verb: 'call'
                 body: "{{ application_data }}"
             register: activate_output
  </code></pre>
  
  <p>custom_application.py:</p>
  
  <p>this is the custom ansible application getting called from main.yml file.</p>
  
  <pre><code> ###couple of imports
  
  
          def main():
              fields = {
                  "verb": {"required": True, "type": "str"},
                  "body": {"required": True, "type": "str"},
  
              }
              module = AnsibleModule(argument_spec=fields)
              verb = module.params['verb']
              body = yaml.load(module.params['body'])
              application = application()   
              response = application.call(body)
              module.exit_json(changed=True, meta=response)
  
          if __name__ == '__main__':
              main() 
  </code></pre>
  
  <p>Application.py:
  python class that does couple of application related things. </p>
  
  <pre><code>def call(body):
     application = {}
     application["is_activated"]=True
     return application
  </code></pre>
  
  <p>above the main.yaml and custom ansible module and application class</p>
  
  <pre><code>        fatal: [localhost]: FAILED! =&gt; {
              "changed": false,
              "failed": true,
              "module_stderr": "",
              "module_stdout": "\"changed\": true, \"meta\": {\"is_activated\": true}}\n",
              "msg": "MODULE FAILURE",
              "rc": 0
          }
  </code></pre>
  
  <p>Module_stdout is as below:</p>
  
  <p>module stdout i truncated the exact module_stdout is given below:                  </p>
  
  <pre><code>{
      "changed": false,
      "failed": true,
      "module_stderr": "",
      "module_stdout": "{
             \"invocation\": {
                 \"module_args\": {
                       \"body\": \"{
                         'application_id': '3f17f2a3-0510-457d-a164-72f3a71c6455', 
                         'file_path': '/tmp/vishnu.json', 
                         'log_file_name': '42ae1299-9cbf-49d3-82da-d2d1eb108eef-2017-09-09-11:26:03.log', 
                         'log_file_dir': '/home/oracle/logs/oracle/'
                        }\",
                        \"verb\": \"activate\"
                    }
                }, 
            \"changed\": false, 
            \"meta\": {
               \"is_activated\": true}
       }\n",
      "msg": "MODULE FAILURE",
      "rc": 0
  }
  </code></pre>
  
  <p>and i think its a valid json object.</p>
  
  <p>a particular ansible step is failing as shown above with no stderr. and i am also getting warning as above.. let me know where i went wrong </p>
  
  <p>Note: i am sending json data as the output of custom ansible module as well</p>