awx smart inventory: problem to get ansible_facts

Hi,

I’m trying to create smart inventories on the base of major operating system version
unfortunately in the facts received from the hosts the entry is received as ansible_distribution_major_version: ‘7’
and, probably due to the presence of ’ character I’m not able to match the os version with smart host filter search string similar to ansible_facts.ansible_distribution_major_version:‘7’
I did many attempts with many variations of ‘7’ but without success
Do someone have any idea how to solve the problem ?

Thanks
Stefano

Can you try with this filter. This isn’t perfect but give a try

variables:linux
variables:7
variables:running

Dear Sujith A R

I tried what you suggested but unfortunately without successfrom my point of view, presenting facts with the following format

ansible_distribution_file_parsed: true
ansible_distribution_file_path: /etc/redhat-release
ansible_distribution_file_variety: RedHat
ansible_distribution_major_version: ‘7’
ansible_distribution_release: Core
ansible_distribution_version: 7.5.1804

should be considered a bug

Thanks for your help attempt