Tag Archives fordevops

Ansible lineinfile module: unsupported parameter for module: path

Is Ansible giving you the error unsupported parameter for module: path when you’re using lineinfile?

Check your Ansible-version!

You probably used path (as of version 2.3) instead of dest.


As the Ansible documentation states:

As of Ansible 2.3, the dest option has been changed to path as default, but dest still works as well.

Solution: change dest into path

This fixed it for me. Now I can ensure composer is in my path.


Explanation of the parts:

  • regexp: the regular expression to look for. The line that matches will be used for present or absent
  • line: this is the line that will be inserted/replaced into the file
  • state: whether or not line should be there. Tip: for advanced usage, look at backrefs for changing parts of the line.
  • dest: the file we want the line in

See the official documentation for more information.

>