- name: Debug
  debug: msg='facter_fqdn is  {{ facter_fqdn }}'
  register: 'debug_result'
- name: Fail
  fail: msg='Sample warning when fqnd != fqdn'
  when: facter_fqdn.find == "{{ facter_fqdn }}"
- name: Fail
  fail: msg='Sample warning when fqdn %like% example.com'
  when: facter_fqdn.find('example.com') != -1
- name: Fail
  fail: msg='Sample warning when fqdn %like% localdomain'
  when: facter_fqdn.find('.local') != -1



On Tuesday, June 2, 2015 at 1:23:04 PM UTC+6, Max wrote:
>
> Suppose I've url=http://example.com:90/url and now in my ansible task I 
> want to get the url variable by {{ url }} and then do a regex match and 
> fetch oly the hostname i.e. example.com.
> Any directions on how this can be achieved would help.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0c2d74da-1313-422f-b5db-42e707425be3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to