On 19.02.2018 10:48, J-P Methot wrote:
> Essentially, I want to extract the floating_ip_address line. So, I've
> been
> using a commonly recognized regex for IP address and, right now, I've
> reached the point where I have the following line:
>
>
> 1. - name: extract the ip line
> 2. set_fact:
> 3. regexcomp: "{{ rawfloating.stdout_lines |
> regex_search('floating_ip_address \\|
> \\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\b') }}"
>
> Now ansible tells me that it's expecting a string or buffer. I'm not
> sure
> what to do anymore. Anyone has any ideas?
rawfloating.stdout_lines is a list not a sting, you need to use
rawfloating.stdout
--
Kai Stian Olstad