title: Ansible : unsupported parameter for module: path"
body: <p>I am new to Ansible and am currently working on little playbook which uses <strong>Ansible</strong>'s <strong>path</strong> <strong>module</strong> to replace a word in a given text file.</p>
  
  <p><strong>Playbook</strong> : test.yml</p>
  
  <pre><code>-  name: Update the provided system to the next version
     hosts: localhost
     run_once: true
     vars:
      prev_version: "{{ PREVIOUS_VERSION }}"
      next_version: "{{ NEXT_VERSION }}"
     tasks:      
  
     - name: Update the software version
       replace:
         path: /home/hamza/TrainingWorkspace/Ansible/application_config.txt
         regexp: prev_version|string
         replace: next_version|string
  </code></pre>
  
  <p><strong>Text file</strong> : application_config.txt</p>
  
  <pre><code>version_info: "2020.2.2"
  </code></pre>
  
  <p>The resources directory is as follows :</p>
  
  <pre><code>hamza@hamza-XX:~/TrainingWorkspace/Ansible$ ls
  application_config.txt  test.yml
  
  
  hamza@hamza-XX:~/TrainingWorkspace/Ansible$ pwd
  /home/hamza/TrainingWorkspace/Ansible
  </code></pre>
  
  <p>If I run the playbook : </p>
  
  <pre><code>ansible-playbook --connection=local --inventory 127.0.0.11, test.yml --extra-vars ' {"PREVIOUS_VERSION":"2020.2.2", "NEXT_VERSION": "2020.99.99"}'
  </code></pre>
  
  <p>I would get the following error :</p>
  
  <pre><code>    PLAY [Update the provided system to the next version] **************************
  
  TASK [setup] *******************************************************************
  ok: [localhost]
  
  TASK [Update the software version] *********************************************
  fatal: [localhost]: FAILED! =&gt; {"changed": false, "failed": true, "msg": "unsupported parameter for module: path"}
  
  PLAY RECAP *********************************************************************
  localhost                  : ok=1    changed=0    unreachable=0    failed=1   
  </code></pre>
  
  <p><strong>NOTE</strong> : ansible-playbook 2.0.0.2</p>
  
  <p>any help would be appreciated ? </p>