mac_maker.utilities.state

Runtime state for the Ansible Runner.

class mac_maker.utilities.state.State[source]

Runtime state persistence and generation for the Ansible Runner.

state_dehydrate(state_data, spec_file_path)[source]

Write a runtime state object to a Job Spec file.

Parameters
  • state_data (TypeState) – The Python object that represents the runtime state.

  • spec_file_path (Union[Path, str]) – The path to the Job Spec file that will be written.

Return type

None

state_generate(filesystem)[source]

Generate a new runtime state object from a FileSystem instance.

Parameters

filesystem (FileSystem) – The FileSystem object you are using.

Return type

TypeState

Returns

The generated runtime state object.

state_rehydrate(spec_file_path)[source]

Read a runtime state object from a Job Spec file.

Parameters

spec_file_path (Union[Path, str]) – The path to the Job Spec file that will be read.

Return type

TypeState

Returns

The runtime state object.

class mac_maker.utilities.state.TypeState[source]

Typed representation of the Ansible Runner’s runtime state.