How to filter the inventory host which is sourced from the satellite ?
Environment
- Red Hat® Ansible Tower 3.8.x
Issue
- How to filter the inventory host which is sourced from Satellite ?
Resolution
-
Set it in Ansible Tower UI.
INVENTORIES --> select the satellite inventory --> SOURCES --> click into the satellite source
-
Set the
HOST FILTER
item, you can set the VERBOSITY to theDEBUG
level if needs to see the log, please refer to the link for the regular expression.- NOTE: The link is not provided by Red Hat and is just for reference.
e.g.
^[^r] Exclude the hosts which are started with the r character.
- NOTE: The link is not provided by Red Hat and is just for reference.
-
Please remove the host at first if it needs to be excluded and has already synced.
INVENTORIES --> select the satellite inventory --> HOSTS
-
If
DEBUG
is enabled, check the log from theJOBS
item. It looks as follows:7.605 DEBUG Filtering host rhel7u9 7.605 DEBUG Filtering host rhel7u9-test
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments