Hi,

I guess you are missing the "body" keyword such as :
uri:
        url: https://127.0.0.1:9640/*/_settings
        method: PUT
        user: admin
        password: admin
        force_basic_auth: no
        return_content: yes
        body_format: json
        validate_certs: no
        headers:
          Content-Type: "application/json"
          Accept: "application/json"
        body:
          index:
            refresh_interval: 180s

Thanks to let us know

Ludo

Le jeudi 22 novembre 2018 08:53:08 UTC+1, Bishwajit Samanta a écrit :
>
> Dear Team,
>
> I am trying to use uri module in ansible, can anybody help me with that.
>
> Actual Command:
>
> curl -XPUT --insecure -u admin:admin "https://127.0.0.1:9640/*/_settings"; 
> -H 'Content-Type: application/json' -d '{ "index" : { "refresh_interval" : 
> "180s" } }'
>
> Ansible URI Module:
> ------------------------------
>
> uri:
>         url: https://127.0.0.1:9640/*/_settings
>         method: PUT
>         user: admin
>         password: admin
>         force_basic_auth: no
>         return_content: yes
>         body_format: json
>         validate_certs: no
>         headers:
>           Content-Type: "application/json"
>           Accept: "application/json"
>         index:
>           refresh_interval: 180s
>
>       register: webpage
>
>     - debug: var=webpage.content
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to