mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
Configurable fact path (#18147)
* Make fact_path configurable * Add docs for fact_path * Add tests for localfacts * Default fact gathering settings in PlayContext
This commit is contained in:
parent
f078946ed3
commit
1b2ad94496
8 changed files with 73 additions and 3 deletions
|
@ -64,6 +64,7 @@ class Play(Base, Taggable, Become):
|
|||
_accelerate_port = FieldAttribute(isa='int', default=5099, always_post_validate=True)
|
||||
|
||||
# Connection
|
||||
_fact_path = FieldAttribute(isa='string', default=None)
|
||||
_gather_facts = FieldAttribute(isa='bool', default=None, always_post_validate=True)
|
||||
_gather_subset = FieldAttribute(isa='barelist', default=None, always_post_validate=True)
|
||||
_gather_timeout = FieldAttribute(isa='int', default=None, always_post_validate=True)
|
||||
|
|
|
@ -208,6 +208,11 @@ class PlayContext(Base):
|
|||
_step = FieldAttribute(isa='bool', default=False)
|
||||
_diff = FieldAttribute(isa='bool', default=False)
|
||||
|
||||
# Fact gathering settings
|
||||
_gather_subset = FieldAttribute(isa='string', default=C.DEFAULT_GATHER_SUBSET)
|
||||
_gather_timeout = FieldAttribute(isa='string', default=C.DEFAULT_GATHER_TIMEOUT)
|
||||
_fact_path = FieldAttribute(isa='string', default=C.DEFAULT_FACT_PATH)
|
||||
|
||||
def __init__(self, play=None, options=None, passwords=None, connection_lockfd=None):
|
||||
|
||||
super(PlayContext, self).__init__()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue