Skip to main content

# Desired State Configuration

Desired state configuration allows users to focus on what they want instead of how to make it so. This simplifies automation for domain experts and allows automation experts to make generic operations that will work for many configurations.

# Getting Started

This repository uses [pipenv](https://pypi.org/project/pipenv/) to manage the dependencies. To install the dependencies for a development environment run the following commands:

pipenv install –dev

To load the shell for this environment run these commands:

pipenv shell

To install an example collection use this command:

ansible-galaxy collection install benthomasson.expect

To run the tests use this command after opening the shell:

pytest -v

# Code Organization

This project uses event driven programming using finite state machines to provide deterministic and correct behavior. This allows the project to react to external events easily.

The entry point for the CLI commands is located the [cli.py](desired_state/cli.py) file.

Message types between finite state machines are defined in [messages.py](desired_state/messages.py).

The reconciliation loop is defined as a finite state machine in [reconciliation_fsm.py](desired_state/reconciliation_fsm.py)

The main monitor process which contains the reconciliation loop is defined in [monitor.py](desired_state/monitor.py)

The generation of playbooks based on the differences between states is defined in [diff.py](desired_state/diff.py).

Selection of appropriate change rules based on state diff is defined in [rule.py](desired_state/rule.py)

A client/server implementation for injecting desired state into the monitor process is defined in the [client.py](desired_state/client.py) and [server.py](desired_state/server.py) files.

Collection support is defined in [collection.py](desired_state/collection.py).

Streaming telemetry is defined in [stream.py](desired_state/stream.py).

State schema validation is provided in [validate.py](desired_state/validate.py).

History

0.1.0 (2020-09-02)

  • First release on PyPI.

Metadata

Release files for desired-state 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for desired-state 0.1.0
File Size Uploaded Provenance
desired_state-0.1.0.tar.gz 36.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for desired-state 0.1.0
File Interpreter ABI Platform
desired_state-0.1.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 58.3 kB

Release files / desired_state-0.1.0.tar.gz

Download URL desired_state-0.1.0.tar.gz
Size 36.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c6d7075f9df6f29a89036ee1bfda0cde780ca1fa7865fb1db4da27bbfed3a4b8
BLAKE2b-256 checksum
How to use checksums
db7da308c2f6837c08972db53522b7dbfd4cb78c75326441b24dbaf78ee6ef83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

Release files / desired_state-0.1.0-py2.py3-none-any.whl

Download URL desired_state-0.1.0-py2.py3-none-any.whl
Size 21.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4e08a548281abf8f4a750c32f6142f017e43198f55d0cb0a54c1d9f25d8c08ee
BLAKE2b-256 checksum
How to use checksums
6ea13fde9bca694cdcd3c37184718fa0265aa9d5f1e4a100f842a86bf438226e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.14.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

Security for desired-state 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page