regex_replace in Ansible 2.8.0

12 views
Skip to first unread message

Sam

unread,
Jul 16, 2019, 2:25:01 PM7/16/19
to Ansible Project
Using Ansible 2.8.0 on Centos 7 with Python 2.7.5

This regex_replace hangs when there is no match. Any idea why this would hang?

  tasks:
    - set_fact:
        departStatusDownloadPattern: "\
                   (?sm).*?<TD.*?Depart Status.*?<\\/TD>\\s\\s*\
                   <TD.*?TD>\\s\\s*\
                   <TD.*?DocumentType=AUTH;GAUTH.*?Organization=.*?<\\/TD>\\s\\s*\
                   <TD.*?TD>\\s\\s*\
                   <TD.*?{{ lookup('pipe', 'date +\"%-b %-d, %Y\"') }}.*?<\\/TD>\\s\\s*\
                   <TD.*?TD>\\s\\s*\
                   <TD.*?TD>\\s\\s*\
                   <TD.*?TD>\\s\\s*\
                   <TD.*?Completed on {{ lookup('pipe', 'date +\"%-b %-d, %Y\"') }}.*?<\\/TD>\\s\\s*\
                   <TD.*?TD>\\s\\s*\
                   <TD.*?javascript:setSelected\\('(.*?)'\\).*"
    - debug:
        msg: "{{ lookup('file', 'work/reportsPage.html') | regex_replace(departStatusDownloadPattern,'\\1') }}"

Reply all
Reply to author
Forward
0 new messages