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
Finally, code search showed me that there is a pyinfra.host.groups: list[str]. I suggest putting that in the doc page I was reading, if not also making a real pyinfra.host.groups attribute that can be discovered more easily.
The text was updated successfully, but these errors were encountered:
Reading https://docs.pyinfra.com/en/2.x/inventory-data.html I didn't see any way to access the set of groups that a host is in. Printing
dir(pyinfra.host)
didn't help, since it looks like this:['annotations', 'class', 'delattr', 'dict', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'getstate', 'gt', 'hash', 'init', 'init_subclass', 'le', 'lt', 'module', 'ne', 'new', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'str', 'subclasshook', 'weakref', '_check_state', 'check_can_rsync', 'connect', 'connected', 'connection', 'create_fact', 'current_deploy_data', 'current_deploy_kwargs', 'current_deploy_name', 'current_op_hash', 'delete_fact', 'deploy', 'disconnect', 'executing_op_hash', 'get_deploy_data', 'get_fact', 'get_file', 'group_data', 'host_data', 'in_deploy', 'in_op', 'loop', 'nested_executing_op_hash', 'noop', 'print_prefix', 'put_file', 'reload_fact', 'rsync', 'run_shell_command', 'style_print_prefix']
Finally, code search showed me that there is a
pyinfra.host.groups: list[str]
. I suggest putting that in the doc page I was reading, if not also making a realpyinfra.host.groups
attribute that can be discovered more easily.The text was updated successfully, but these errors were encountered: