title: Trigger jenkins Job using Ansible uri module does not work
body: <p>I'm able to trigger jenkins job remotely using the below two commands:</p>
  <p>Step 1: get the crumb</p>
  <p>curl -s -k 'https://user1:118f32aa48601c136d29b11f3dd0e107f5@portal.myshop.com:9043/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,&quot;:&quot;,//crumb)'</p>
  <p>Output:</p>
  <blockquote>
  <p>Jenkins-Crumb:09e4712ad43932fd474594aa3e1216a47c99030647e23f3f570dbfbc5e34ac4e</p>
  </blockquote>
  <p>Step 2: Invoke Jenkins URL build successfully using the below curl command in verbose mode and pass string parameter <code>myname=Tom</code></p>
  <pre><code>curl -vvv -k -X POST https://user1:118f32aa48601c136d29b11f3dd0e107f5@portal.myshop.com:9043/job/job5/buildWithParameters?myname=Tom  -H &quot;Jenkins-Crumb:09e4712ad43932fd474594aa3e1216a47c99030647e23f3f570dbfbc5e34ac4e&quot;
  * About to connect() to portal.myshop.com port 9043 (#0)
  *   Trying 10.9.9.54...
  * Connected to portal.myshop.com (10.9.9.54) port 9043 (#0)
  * Initializing NSS with certpath: sql:/etc/pki/nssdb
  * skipping SSL peer certificate verification
  * SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
  * Server certificate:
  *       subject: CN=portal.myshop.com,OU=Information Technology,O=myshop  Ltd,L=Mumbai,ST=MH,C=IN
  *       start date: Jul 01 08:11:48 2020 GMT
  *       expire date: Jun 29 08:11:48 2030 GMT
  *       common name: portal.myshop.com
  *       issuer: CN=portal.myshop.com,OU=Information Technology,O=myshop  Ltd,L=Mumbai,ST=MH,C=IN
  * Server auth using Basic with user 'user1'
  &gt; POST /job/job5/buildWithParameters?myname=Tom HTTP/1.1
  &gt; Authorization: Basic MTg2MDEyOjExOGYzMmFhNDg2MDFjMTM2ZDI5YjExZjNkZDBlMTA3ZjU=
  &gt; User-Agent: curl/7.29.0
  &gt; Host: portal.myshop.com:9043
  &gt; Accept: */*
  &gt; Jenkins-Crumb:09e4712ad43932fd474594aa3e1216a47c99030647e23f3f570dbfbc5e34ac4e
  &gt;
  &lt; HTTP/1.1 201 Created
  &lt; Date: Fri, 18 Sep 2020 22:19:56 GMT
  &lt; X-Content-Type-Options: nosniff
  &lt; Location: https://portal.myshop.com:9043/queue/item/19453/
  &lt; Content-Length: 0
  &lt; Server: Jetty(NOTHING)
  &lt;
  * Connection #0 to host portal.myshop.com left intact
  </code></pre>
  <p>Now, I'm trying the same using ansible's <code>uri</code> module but it fails with <code>Status code was 403 and not [200]: HTTP Error 403: Forbidden</code> and <code>HTTP ERROR 403 No valid crumb was included in the request</code> error.</p>
  <p>Below is my playbook:</p>
  <pre><code>---
  - name: &quot;Play 1&quot;
    hosts: localhost
    tasks:
  
      - name: Add host
        uri:
          url: &quot;https://user1:118f32aa48601c136d29b11f3dd0e107f5@portal.myshop.com:9043/job/job5&quot;
          validate_certs: false
          method: POST
          body_format: form-urlencoded
  #        body_format: json
          body:
            - [ myname, &quot;Tom&quot; ]
          http_agent: &quot;Jenkins-Crumb:09e4712ad43932fd474594aa3e1216a47c99030647e23f3f570dbfbc5e34ac4e&quot;
  
          headers:
            Jenkins-Crumb: &quot;09e4712ad43932fd474594aa3e1216a47c99030647e23f3f570dbfbc5e34ac4e&quot;
  </code></pre>
  <p>Here is the verbose output:</p>
  <pre><code>PLAY [Play 1] **********************************************************************************************************************************************************
  
  TASK [Gathering Facts] *************************************************************************************************************************************************
  
  
  TASK [Add host] ********************************************************************************************************************************************************
  task path: /app/test/Ansible/playbook/uritest.yml:13
  &lt;127.0.0.1&gt; ESTABLISH LOCAL CONNECTION FOR USER: unixuser1
  &lt;127.0.0.1&gt; EXEC /bin/sh -c 'echo ~unixuser1 &amp;&amp; sleep 0'
  &lt;127.0.0.1&gt; EXEC /bin/sh -c '( umask 77 &amp;&amp; mkdir -p &quot;` echo /home/unixuser1/.ansible/tmp/ansible-tmp-1600455948.59-238281813476791 `&quot; &amp;&amp; echo ansible-tmp-1600455948.59-238281813476791=&quot;` echo /home/unixuser1/.ansible/tmp/ansible-tmp-1600455948.59-238281813476791 `&quot; ) &amp;&amp; sleep 0'
  Using module file /usr/lib/python2.7/site-packages/ansible/modules/net_tools/basics/uri.py
  Pipelining is enabled.
  &lt;127.0.0.1&gt; EXEC /bin/sh -c '/usr/bin/python2 &amp;&amp; sleep 0'
  &lt;127.0.0.1&gt; EXEC /bin/sh -c 'rm -f -r /home/unixuser1/.ansible/tmp/ansible-tmp-1600455948.59-238281813476791/ &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0'
  fatal: [localhost]: FAILED! =&gt; {
      &quot;cache_control&quot;: &quot;must-revalidate,no-cache,no-store&quot;,
      &quot;changed&quot;: false,
      &quot;connection&quot;: &quot;close&quot;,
      &quot;content&quot;: &quot;&lt;html&gt;\n&lt;head&gt;\n&lt;meta http-equiv=\&quot;Content-Type\&quot; content=\&quot;text/html;charset=utf-8\&quot;/&gt;\n&lt;title&gt;Error 403 No valid crumb was included in the request&lt;/title&gt;\n&lt;/head&gt;\n&lt;body&gt;&lt;h2&gt;HTTP ERROR 403 No valid crumb was included in the request&lt;/h2&gt;\n&lt;table&gt;\n&lt;tr&gt;&lt;th&gt;URI:&lt;/th&gt;&lt;td&gt;/job/job5&lt;/td&gt;&lt;/tr&gt;\n&lt;tr&gt;&lt;th&gt;STATUS:&lt;/th&gt;&lt;td&gt;403&lt;/td&gt;&lt;/tr&gt;\n&lt;tr&gt;&lt;th&gt;MESSAGE:&lt;/th&gt;&lt;td&gt;No valid crumb was included in the request&lt;/td&gt;&lt;/tr&gt;\n&lt;tr&gt;&lt;th&gt;SERVLET:&lt;/th&gt;&lt;td&gt;Stapler&lt;/td&gt;&lt;/tr&gt;\n&lt;/table&gt;\n&lt;hr&gt;&lt;a href=\&quot;http://eclipse.org/jetty\&quot;&gt;Powered by Jetty:// NOTHING&lt;/a&gt;&lt;hr/&gt;\n\n&lt;/body&gt;\n&lt;/html&gt;\n&quot;,
      &quot;content_length&quot;: &quot;541&quot;,
      &quot;content_type&quot;: &quot;text/html;charset=iso-8859-1&quot;,
      &quot;elapsed&quot;: 0,
      &quot;invocation&quot;: {
          &quot;module_args&quot;: {
              &quot;attributes&quot;: null,
              &quot;backup&quot;: null,
              &quot;body&quot;: [
                  [
                      &quot;myname&quot;,
                      &quot;Tom&quot;
                  ]
              ],
              &quot;body_format&quot;: &quot;json&quot;,
              &quot;client_cert&quot;: null,
              &quot;client_key&quot;: null,
              &quot;content&quot;: null,
              &quot;creates&quot;: null,
              &quot;delimiter&quot;: null,
              &quot;dest&quot;: null,
              &quot;directory_mode&quot;: null,
              &quot;follow&quot;: false,
              &quot;follow_redirects&quot;: &quot;safe&quot;,
              &quot;force&quot;: false,
              &quot;force_basic_auth&quot;: false,
              &quot;group&quot;: null,
              &quot;headers&quot;: {
                  &quot;Content-Type&quot;: &quot;application/json&quot;,
                  &quot;Jenkins-Crumb&quot;: &quot;09e4712ad43932fd474594aa3e1216a47c99030647e23f3f570dbfbc5e34ac4e&quot;
              },
              &quot;http_agent&quot;: &quot;Jenkins-Crumb:09e4712ad43932fd474594aa3e1216a47c99030647e23f3f570dbfbc5e34ac4e&quot;,
              &quot;method&quot;: &quot;POST&quot;,
              &quot;mode&quot;: null,
              &quot;owner&quot;: null,
              &quot;regexp&quot;: null,
              &quot;remote_src&quot;: null,
              &quot;removes&quot;: null,
              &quot;return_content&quot;: false,
              &quot;selevel&quot;: null,
              &quot;serole&quot;: null,
              &quot;setype&quot;: null,
              &quot;seuser&quot;: null,
              &quot;src&quot;: null,
              &quot;status_code&quot;: [
                  200
              ],
              &quot;timeout&quot;: 30,
              &quot;unix_socket&quot;: null,
              &quot;unsafe_writes&quot;: null,
              &quot;url&quot;: &quot;https://user1:118f32aa48601c136d29b11f3dd0e107f5@portal.myshop.com:9043/job/job5&quot;,
              &quot;url_password&quot;: null,
              &quot;url_username&quot;: null,
              &quot;use_proxy&quot;: true,
              &quot;validate_certs&quot;: false
          }
      },
      &quot;msg&quot;: &quot;Status code was 403 and not [200]: HTTP Error 403: Forbidden&quot;,
      &quot;redirected&quot;: false,
      &quot;server&quot;: &quot;Jetty(NOTHING)&quot;,
      &quot;set_cookie&quot;: &quot;ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE=; Path=/; Expires=Thu, 01-Jan-1970 00:00:00 GMT; Max-Age=0; Secure; HttpOnly, JSESSIONID.6900aad5=node06k5hjy5nr15txhr0qj9kzxp3791.node0; Path=/; Secure; HttpOnly&quot;,
      &quot;status&quot;: 403,
      &quot;url&quot;: &quot;https://user1:118f32aa48601c136d29b11f3dd0e107f5@portal.myshop.com:9043/job/job5&quot;,
      &quot;x_content_type_options&quot;: &quot;nosniff&quot;
  }
  
  PLAY RECAP *************************************************************************************************************************************************************
  localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
  
  I also tried passing the `url_username` and url_password` but i still get 403  as below:
  
      - name: Add host
        uri:
          url: &quot;https://portal.myshop.com:9043/job/job5&quot;
          validate_certs: false
          method: POST
          url_username: &quot;user1&quot;
          url_password: &quot;Monsoon2020@&quot;
  #        force_basic_auth: yes
          body_format: form-urlencoded
          body:
            - [ name, &quot;DEKHTEHAIN&quot; ]
          http_agent: &quot;Jenkins-Crumb:51ef89606820baccc3aed6bb6c26e54af129d56b65be97b679fb89d14fa87a1e&quot;
  
          headers:
            Jenkins-Crumb: &quot;51ef89606820baccc3aed6bb6c26e54af129d56b65be97b679fb89d14fa87a1e&quot;
  </code></pre>
  <p>Output:</p>
  <pre><code>TASK [Add host] ********************************************************************************************************************************************************
  task path: /app/test/Ansible/playbook/checkssh/uritest.yml:13
  &lt;127.0.0.1&gt; ESTABLISH LOCAL CONNECTION FOR USER: unixuser1
  &lt;127.0.0.1&gt; EXEC /bin/sh -c 'echo ~unixuser1 &amp;&amp; sleep 0'
  &lt;127.0.0.1&gt; EXEC /bin/sh -c '( umask 77 &amp;&amp; mkdir -p &quot;` echo /home/unixuser1/.ansible/tmp/ansible-tmp-1600467804.84-53369931519150 `&quot; &amp;&amp; echo ansible-tmp-1600467804.84-53369931519150=&quot;` echo /home/unixuser1/.ansible/tmp/ansible-tmp-1600467804.84-53369931519150 `&quot; ) &amp;&amp; sleep 0'
  Using module file /usr/lib/python2.7/site-packages/ansible/modules/net_tools/basics/uri.py
  Pipelining is enabled.
  &lt;127.0.0.1&gt; EXEC /bin/sh -c '/usr/bin/python2 &amp;&amp; sleep 0'
  &lt;127.0.0.1&gt; EXEC /bin/sh -c 'rm -f -r /home/unixuser1/.ansible/tmp/ansible-tmp-1600467804.84-53369931519150/ &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0'
  fatal: [localhost]: FAILED! =&gt; {
      &quot;cache_control&quot;: &quot;must-revalidate,no-cache,no-store&quot;,
      &quot;changed&quot;: false,
      &quot;connection&quot;: &quot;close&quot;,
      &quot;content&quot;: &quot;&lt;html&gt;\n&lt;head&gt;\n&lt;meta http-equiv=\&quot;Content-Type\&quot; content=\&quot;text/html;charset=utf-8\&quot;/&gt;\n&lt;title&gt;Error 403 No valid crumb was included in the request&lt;/title&gt;\n&lt;/head&gt;\n&lt;body&gt;&lt;h2&gt;HTTP ERROR 403 No valid crumb was included in the request&lt;/h2&gt;\n&lt;table&gt;\n&lt;tr&gt;&lt;th&gt;URI:&lt;/th&gt;&lt;td&gt;/job/job5&lt;/td&gt;&lt;/tr&gt;\n&lt;tr&gt;&lt;th&gt;STATUS:&lt;/th&gt;&lt;td&gt;403&lt;/td&gt;&lt;/tr&gt;\n&lt;tr&gt;&lt;th&gt;MESSAGE:&lt;/th&gt;&lt;td&gt;No valid crumb was included in the request&lt;/td&gt;&lt;/tr&gt;\n&lt;tr&gt;&lt;th&gt;SERVLET:&lt;/th&gt;&lt;td&gt;Stapler&lt;/td&gt;&lt;/tr&gt;\n&lt;/table&gt;\n&lt;hr&gt;&lt;a href=\&quot;http://eclipse.org/jetty\&quot;&gt;Powered by Jetty:// NOTHING&lt;/a&gt;&lt;hr/&gt;\n\n&lt;/body&gt;\n&lt;/html&gt;\n&quot;,
      &quot;content_length&quot;: &quot;541&quot;,
      &quot;content_type&quot;: &quot;text/html;charset=iso-8859-1&quot;,
      &quot;elapsed&quot;: 0,
      &quot;invocation&quot;: {
          &quot;module_args&quot;: {
              &quot;attributes&quot;: null,
              &quot;backup&quot;: null,
              &quot;body&quot;: [
                  [
                      &quot;name&quot;,
                      &quot;DEKHTEHAIN&quot;
                  ]
              ],
              &quot;body_format&quot;: &quot;form-urlencoded&quot;,
              &quot;client_cert&quot;: null,
              &quot;client_key&quot;: null,
              &quot;content&quot;: null,
              &quot;creates&quot;: null,
              &quot;delimiter&quot;: null,
              &quot;dest&quot;: null,
              &quot;directory_mode&quot;: null,
              &quot;follow&quot;: false,
              &quot;follow_redirects&quot;: &quot;safe&quot;,
              &quot;force&quot;: false,
              &quot;force_basic_auth&quot;: false,
              &quot;group&quot;: null,
              &quot;headers&quot;: {
                  &quot;Content-Type&quot;: &quot;application/x-www-form-urlencoded&quot;,
                  &quot;Jenkins-Crumb&quot;: &quot;51ef89606820baccc3aed6bb6c26e54af129d56b65be97b679fb89d14fa87a1e&quot;
              },
              &quot;http_agent&quot;: &quot;Jenkins-Crumb:51ef89606820baccc3aed6bb6c26e54af129d56b65be97b679fb89d14fa87a1e&quot;,
              &quot;method&quot;: &quot;POST&quot;,
              &quot;mode&quot;: null,
              &quot;owner&quot;: null,
              &quot;regexp&quot;: null,
              &quot;remote_src&quot;: null,
              &quot;removes&quot;: null,
              &quot;return_content&quot;: false,
              &quot;selevel&quot;: null,
              &quot;serole&quot;: null,
              &quot;setype&quot;: null,
              &quot;seuser&quot;: null,
              &quot;src&quot;: null,
              &quot;status_code&quot;: [
                  200
              ],
              &quot;timeout&quot;: 30,
              &quot;unix_socket&quot;: null,
              &quot;unsafe_writes&quot;: null,
              &quot;url&quot;: &quot;https://portal.myshop.com:9043/job/job5&quot;,
              &quot;url_password&quot;: &quot;VALUE_SPECIFIED_IN_NO_LOG_PARAMETER&quot;,
              &quot;url_username&quot;: &quot;user1&quot;,
              &quot;use_proxy&quot;: true,
              &quot;validate_certs&quot;: false
          }
      },
      &quot;msg&quot;: &quot;Status code was 403 and not [200]: HTTP Error 403: Forbidden&quot;,
      &quot;redirected&quot;: false,
      &quot;server&quot;: &quot;Jetty(NOTHING)&quot;,
      &quot;set_cookie&quot;: &quot;ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE=; Path=/; Expires=Thu, 01-Jan-1970 00:00:00 GMT; Max-Age=0; Secure; HttpOnly, JSESSIONID.6900aad5=node0d8lg3gcureb671sndwrtobwm800.node0; Path=/; Secure; HttpOnly&quot;,
      &quot;status&quot;: 403,
      &quot;url&quot;: &quot;https://portal.myshop.com:9043/job/job5&quot;,
      &quot;x_content_type_options&quot;: &quot;nosniff&quot;
  }
  
  PLAY RECAP *************************************************************************************************************************************************************
  localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
  </code></pre>
  <p>I then tried with <code>force_basic_auth: yes</code> but i get <code> HTTP Error 401: Unauthorized</code> error.</p>
  <pre><code>TASK [Add host] ********************************************************************************************************************************************************
  task path: /app/test/Ansible/playbook/checkssh/uritest.yml:13
  &lt;127.0.0.1&gt; ESTABLISH LOCAL CONNECTION FOR USER: unixuser1
  &lt;127.0.0.1&gt; EXEC /bin/sh -c 'echo ~unixuser1 &amp;&amp; sleep 0'
  &lt;127.0.0.1&gt; EXEC /bin/sh -c '( umask 77 &amp;&amp; mkdir -p &quot;` echo /home/unixuser1/.ansible/tmp/ansible-tmp-1600467896.88-164232533519804 `&quot; &amp;&amp; echo ansible-tmp-1600467896.88-164232533519804=&quot;` echo /home/unixuser1/.ansible/tmp/ansible-tmp-1600467896.88-164232533519804 `&quot; ) &amp;&amp; sleep 0'
  Using module file /usr/lib/python2.7/site-packages/ansible/modules/net_tools/basics/uri.py
  Pipelining is enabled.
  &lt;127.0.0.1&gt; EXEC /bin/sh -c '/usr/bin/python2 &amp;&amp; sleep 0'
  &lt;127.0.0.1&gt; EXEC /bin/sh -c 'rm -f -r /home/unixuser1/.ansible/tmp/ansible-tmp-1600467896.88-164232533519804/ &gt; /dev/null 2&gt;&amp;1 &amp;&amp; sleep 0'
  fatal: [localhost]: FAILED! =&gt; {
      &quot;cache_control&quot;: &quot;must-revalidate,no-cache,no-store&quot;,
      &quot;changed&quot;: false,
      &quot;connection&quot;: &quot;close&quot;,
      &quot;content&quot;: &quot;&lt;html&gt;\n&lt;head&gt;\n&lt;meta http-equiv=\&quot;Content-Type\&quot; content=\&quot;text/html;charset=utf-8\&quot;/&gt;\n&lt;title&gt;Error 401 Invalid password/token for user: user1&lt;/title&gt;\n&lt;/head&gt;\n&lt;body&gt;&lt;h2&gt;HTTP ERROR 401 Invalid password/token for user: user1&lt;/h2&gt;\n&lt;table&gt;\n&lt;tr&gt;&lt;th&gt;URI:&lt;/th&gt;&lt;td&gt;/job/job5&lt;/td&gt;&lt;/tr&gt;\n&lt;tr&gt;&lt;th&gt;STATUS:&lt;/th&gt;&lt;td&gt;401&lt;/td&gt;&lt;/tr&gt;\n&lt;tr&gt;&lt;th&gt;MESSAGE:&lt;/th&gt;&lt;td&gt;Invalid password/token for user: user1&lt;/td&gt;&lt;/tr&gt;\n&lt;tr&gt;&lt;th&gt;SERVLET:&lt;/th&gt;&lt;td&gt;Stapler&lt;/td&gt;&lt;/tr&gt;\n&lt;/table&gt;\n&lt;hr&gt;&lt;a href=\&quot;http://eclipse.org/jetty\&quot;&gt;Powered by Jetty:// NOTHING&lt;/a&gt;&lt;hr/&gt;\n\n&lt;/body&gt;\n&lt;/html&gt;\n&quot;,
      &quot;content_length&quot;: &quot;532&quot;,
      &quot;content_type&quot;: &quot;text/html;charset=iso-8859-1&quot;,
      &quot;elapsed&quot;: 0,
      &quot;invocation&quot;: {
          &quot;module_args&quot;: {
              &quot;attributes&quot;: null,
              &quot;backup&quot;: null,
              &quot;body&quot;: [
                  [
                      &quot;name&quot;,
                      &quot;DEKHTEHAIN&quot;
                  ]
              ],
              &quot;body_format&quot;: &quot;form-urlencoded&quot;,
              &quot;client_cert&quot;: null,
              &quot;client_key&quot;: null,
              &quot;content&quot;: null,
              &quot;creates&quot;: null,
              &quot;delimiter&quot;: null,
              &quot;dest&quot;: null,
              &quot;directory_mode&quot;: null,
              &quot;follow&quot;: false,
              &quot;follow_redirects&quot;: &quot;safe&quot;,
              &quot;force&quot;: false,
              &quot;force_basic_auth&quot;: true,
              &quot;group&quot;: null,
              &quot;headers&quot;: {
                  &quot;Content-Type&quot;: &quot;application/x-www-form-urlencoded&quot;,
                  &quot;Jenkins-Crumb&quot;: &quot;51ef89606820baccc3aed6bb6c26e54af129d56b65be97b679fb89d14fa87a1e&quot;
              },
              &quot;http_agent&quot;: &quot;Jenkins-Crumb:51ef89606820baccc3aed6bb6c26e54af129d56b65be97b679fb89d14fa87a1e&quot;,
              &quot;method&quot;: &quot;POST&quot;,
              &quot;mode&quot;: null,
              &quot;owner&quot;: null,
              &quot;regexp&quot;: null,
              &quot;remote_src&quot;: null,
              &quot;removes&quot;: null,
              &quot;return_content&quot;: false,
              &quot;selevel&quot;: null,
              &quot;serole&quot;: null,
              &quot;setype&quot;: null,
              &quot;seuser&quot;: null,
              &quot;src&quot;: null,
              &quot;status_code&quot;: [
                  200
              ],
              &quot;timeout&quot;: 30,
              &quot;unix_socket&quot;: null,
              &quot;unsafe_writes&quot;: null,
              &quot;url&quot;: &quot;https://portal.myshop.com:9043/job/job5&quot;,
              &quot;url_password&quot;: &quot;VALUE_SPECIFIED_IN_NO_LOG_PARAMETER&quot;,
              &quot;url_username&quot;: &quot;user1&quot;,
              &quot;use_proxy&quot;: true,
              &quot;validate_certs&quot;: false
          }
      },
      &quot;msg&quot;: &quot;Status code was 401 and not [200]: HTTP Error 401: Unauthorized&quot;,
      &quot;redirected&quot;: false,
      &quot;server&quot;: &quot;Jetty(NOTHING)&quot;,
      &quot;status&quot;: 401,
      &quot;url&quot;: &quot;https://portal.myshop.com:9043/job/job5&quot;,
      &quot;www_authenticate&quot;: &quot;Basic realm=\&quot;Jenkins\&quot;&quot;,
      &quot;x_content_type_options&quot;: &quot;nosniff&quot;
  }
  
  PLAY RECAP *************************************************************************************************************************************************************
  localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0  
  </code></pre>
  <p>Note: The purpose of using uri module instead of [ curl with raw or command module ] is that; I'm having issues / difficulties passing Jenkins multiline parameters myname to curl which is unresolved here</p>
  <p>Can you please suggest how can i fix the issue?</p>