title: How to use fetch module in ansible
body: <p>I want to copy file from remote server to local machine using ansible playbook. But when I do that using fetch module folder with server IP gets created on local machine with complete directory structure. Is there a way to avoid that? Below is my task from playbook</p>
  <pre class="lang-yaml prettyprint-override"><code>- name: Copy files from remote to local
    fetch:
      src: /etc/pki/ca.pem
      dest: /etc/workloadmgr
  </code></pre>