How to put a script user_data in a CALL API for deploy?

Hi

I manage machines by ansible and API call . I can deploy an ubuntu but once i put user_data on the API CALL; installation failed .

The SH work when i put by GUI … but by call API with same script it failed.

My ansible task :

uri:

     url: "https://uri.com/MAAS/api/2.0/machines/{{id_in_maas}}/?op=deploy"
     method: POST
     body_format: json
     body: "{{ lookup('file','tmp/v3bf33-srv02-deploy.json')  }}"
     headers:
        Authorization: OAuth oauth_consumer_key="*",oauth_token="*",oauth_signature_method="PLAINTEXT",oauth_timestamp="1952448470",oauth_nonce="{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}",oauth_version="1.0",oauth_signature="%26****"
        Content-Type: "application/json"
     use_proxy: yes
     validate_certs: False

FILE v3bf33-srv02-deploy.json

{
“osystem”: “*",
“distro_series”: "
”,
“user_data”: “$(base64 user-data-v3bf33-srv02.sh)”
}

MAAS say : Installation has failed and no output was given. but no log under MAAS UI and the log go too fast under IDRAC console of the server…

File with installation OK :

{
“osystem”: “",
“distro_series”: "

}

I miss something?? someone have an idea??

thanks.