I have version 1.8.2 of ansible, but it’s giving me this error when I try to use regex with lineinfile:
**msg: unsupported parameter for module: regex**
Here's what I'm trying to run:
- name: Set ASSET_VERSION to commit hash
sudo: true
sudo_user: "{{ app_name }}"
lineinfile:
dest: "{{ env_path }}/{{ app_name }}-env.{{ stage }}"
line: "ASSET_VERSION={{ commit_hash.stdout }}"
regex: "^ASSET_VERSION="
state: present
tags:
- design
It will run without the regex, but not with the regex. Was regex taken out of lineinfile?