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:
Alvaro Aleman 2017-01-12 16:49:04 +01:00 committed by Brian Coca
commit 1b2ad94496
8 changed files with 73 additions and 3 deletions

View file

@ -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)

View file

@ -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__()