diff --git a/lib/towerops/profiles/yaml_profiles.ex b/lib/towerops/profiles/yaml_profiles.ex index cae73b2e..15e6d981 100644 --- a/lib/towerops/profiles/yaml_profiles.ex +++ b/lib/towerops/profiles/yaml_profiles.ex @@ -783,6 +783,10 @@ defmodule Towerops.Profiles.YamlProfiles do patterns == [] and regexes == [] -> true + # sys_descr is nil - cannot match patterns/regexes + is_nil(sys_descr) -> + false + # Has pattern constraints - must match at least one patterns != [] -> Enum.any?(patterns, fn pattern -> String.contains?(sys_descr, pattern) end)