Hi,
vars.oracle_health["tablespace-usage"] = {
oracle_health_name = [ "SYSTEM", "USERS" ]
}
creates a nested condition - you want services for
- tablespace-usage with SYSTEM
- tablespace-usage with USERS
The current apply for look only names tablespace-usage
as loop key, and doesn’t know how to access the inner additional tablespace names.
There’s two solutions for this:
Either you create unique key-names inside the host object for vars.oracle_health
, like
vars.oracle_health["tablespace-usage-system"] = {
oracle_health_name = "SYSTEM"
}
vars.oracle_health["tablespace-usage-users"] = {
oracle_health_name = "USERS"
}
and cut the mode
inside the apply for loop, like
if (match("tablespace-usage*", mode)) {
vars.oracle_health_mode = "tablespace-usage"
} else {
vars.oracle_health_mode = mode
}
or you’ll follow this howto to flatten specific nested arrays. Keep in mind that this may not work with the other keys in vars.oracle_health
then.
The main problem is that oracle_health_name
only takes a single tablespace name, not arrays or lists.
Cheers,
Michael