regex with lineinfile module giving error

623 views
Skip to first unread message

Jim McMahon

unread,
Jul 6, 2015, 4:34:17 PM7/6/15
to ansible...@googlegroups.com
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?

Brian Coca

unread,
Jul 6, 2015, 4:53:59 PM7/6/15
to ansible...@googlegroups.com
regexp not regex is the parameter.
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/8bac9747-cae3-4ee6-9f06-bcc848c6d151%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Brian Coca

Jim McMahon

unread,
Jul 6, 2015, 4:59:46 PM7/6/15
to ansible...@googlegroups.com
Ugh!.  Thanks
Reply all
Reply to author
Forward
0 new messages