You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would really be nice to have the same kind of feature as the aws_ec2 dynamic inventory on the Docker one, for example, to exclude; or only include containers with a certain label.
E.g.:
plugin: community.docker.docker_containersdocker_host: unix://var/run/docker.sockinclude_filters:
## will only include containers having the custom label 'foo' in the inventory## e.g.: In their Dockerfile,`LABEL my_customer_label=foo`
- docker_config.Labels.my_custom_label:
- foo
The text was updated successfully, but these errors were encountered:
The amazon.aws.aws_ec2 options directly translate to API request parameters, so I guess filters can and should look differently here.
This feels like something that should be generally available for all inventory plugins IMO, probably something using Jinja2 expressions that can include/exclude based on random properties returned by the inventory plugin for the host.
SUMMARY
It would be nice to offer the possibility to exclude certain containers from the dynamic inventory, via a white or black list parameter.
For example, in the
amazon.aws.aws_ec2
dynamic inventory, they are proposing two options:exclude_filters
include_filters
ISSUE TYPE
COMPONENT NAME
community.docker.docker_containers
;plugins/inventory/docker_containers.py
ADDITIONAL INFORMATION
It would really be nice to have the same kind of feature as the
aws_ec2
dynamic inventory on the Docker one, for example, to exclude; or only include containers with a certain label.E.g.:
The text was updated successfully, but these errors were encountered: