Project

General

Profile

Actions

Feature #1611

open

Search for hosts without certain facts

Added by Greg Sutcliffe about 12 years ago. Updated about 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Search
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Some of my hosts have a fact "my_fact". I would like to be able to search for the hosts where this fact doesn't exist. This doesn't seemed to be possible within the current search system - things like "not has facts.my_fact" don't work, nor does "facts.myfact !~ *".


Related issues 1 (0 open1 closed)

Has duplicate Foreman - Feature #1168: Ability to search for Facts (and Param) without providing a valueResolvedAmos Benari09/13/2011Actions
Actions #1

Updated by Ohad Levy over 10 years ago

  • Has duplicate Feature #1168: Ability to search for Facts (and Param) without providing a value added
Actions #2

Updated by Ohad Levy over 10 years ago

  • Status changed from New to Duplicate
Actions #3

Updated by Ewoud Kohl van Wijngaarden about 10 years ago

  • Category set to Search
  • Status changed from Duplicate to New

This is a different issue from #1168 since that's resolved, but this is still relevant.

Steps to reproduce:

  • Have a custom fact that is only on a few hosts (i.e. a fact confined to one osfamily)
  • Try to search for hosts without that fact

I wrote a custom fact reboot_needed and now I want to know which hosts lack this fact. I tried the options Greg provided in the description and failed to find the hosts.

Actions

Also available in: Atom PDF