pyinfra.api.facts¶
The pyinfra facts API. Facts enable pyinfra to collect remote server state which is used to “diff” with the desired state, producing the final commands required for a deploy.
-
class
pyinfra.api.facts.
FactBase
¶ Bases:
object
-
default
= None¶
-
process
(output)¶
-
process_pipeline
(args, output)¶
-
-
class
pyinfra.api.facts.
FactMeta
(name, bases, attrs)¶ Bases:
type
Metaclass to dynamically build the facts index.
-
pyinfra.api.facts.
get_fact
(state, hostname, name)¶ Wrapper around
get_facts
returning facts for one host or a function that does.
-
pyinfra.api.facts.
get_fact_names
()¶ Returns a list of available facts in camel_case format.
-
pyinfra.api.facts.
get_facts
(state, name, args=None, sudo=False, sudo_user=None, su_user=None)¶ Get a single fact for all hosts in the state.
-
pyinfra.api.facts.
get_pipeline_facts
(state, name, args, sudo, sudo_user)¶
-
pyinfra.api.facts.
is_fact
(name)¶