Skip to content

Releases: pyinfra-dev/pyinfra

v3.9.2

Choose a tag to compare

@Fizzadar Fizzadar released this 07 Jun 21:05
Immutable release. Only release title and notes can be modified.
6ff582a
  • Fix documentation recursive copy mess

v3.9.1

Choose a tag to compare

@Fizzadar Fizzadar released this 07 Jun 20:33
Immutable release. Only release title and notes can be modified.
e09bfb4
  • Fix documentation redirect pages generation

v3.9.0

Choose a tag to compare

@Fizzadar Fizzadar released this 07 Jun 20:24
Immutable release. Only release title and notes can be modified.
0dace50

Another big release with a lot of fixes and improvements across the board - thank you to all contributors! This release also comes alongside completely refreshed documentation site, with a huge number of UX and copy improvements and a shiny new marketing site.

Core:

Operations/facts:

  • operations.dnf: add support for DNF modules (#1660) (@yagarea)
  • operations.git: chown worktree metadata in source repo (#1710) (@wowi42)
  • operations.files: add extended_regex option to line and replace (#1714) (@case)
  • operations.server: pre-check shadow tools in user op (#1707) (@wowi42)
  • operations.docker.volume: use docker volume rm to delete volumes (#1741) (@wowi42)
  • operations.apt: add sources_file operation (#1597) (@maisim)
  • operations.crontab: detect change of crontab entry with only special time (#1722) (@sebastiaanhoogeveen)
  • operations: handle output from the 'uutils' version of stat (eg. recent Ubuntu) (#1733) (@egnor)
  • operations.server: handle OpenBSD useradd properly (#1739) (@epicrazzmatazz)
  • facts.server: add EtcHosts, Last, Lastb, LoadAverage facts + server.etc_hosts op (#1669) (@wowi42)
  • facts.iptables: requires_command() error in when table specified (#1730) (@doug-fitzmaurice-rowden)
  • operations: handle password prompt from sudo-rs (eg. recent Ubuntu) (#1734) (@egnor)
  • facts: add AptPackages fact (#1740) (@mvanhorn)
  • operations.files: handle large download cache time (#1774) (@puneetdixit200)
  • facts.openrc: make OpenrcStatus match service names containing a dot (#1777) (@chimekkoo)
  • operations.python: correct type on exception argument
  • facts.util.packages: add PackageInfo model (phase 1 of #1725) (#1726) (@wowi42)
  • operations.files: shell-quote files.block content (#1759) (@wowi42)
  • operations.util.files: normalize octal mode spellings in ensure_mode_int (#1786) (@mvanhorn)
  • operations.gpg.key: use _matches_keyid for full-fingerprint idempotency check (#1718) (@maisim)

Connectors:

  • connectors.util: honour _temp_dir in askpass helpers (#1666) (@wowi42)
  • connectors.ssh: auto-load OpenSSH user certificates from ssh_config (#1750) (@wowi42)

CLI:

  • cli: add --use-sudo-login option (#1728) (@wucm667)
  • cli: keep trying module candidates when attribute is missing (#1748) (@wowi42)
  • cli: add --json flag for pure JSON stdout output (#1662) (@wowi42)

Docs/meta:

  • AGENTS: codify recurring PR review feedback as rules (#1700) (@wowi42)
  • style: extend linting with modern Python syntax checks (#1721) (@DonDebonair)
  • test: fix apt.packages update_cached fixture for non-UTC contributors (#1716) (@case)
  • docs: add contributing setup for editable module (#1755) (@evilham)
  • docs: Add missing apostrophes (#1761) (@blinskey)
  • docs: remove stray 'LINK' in chmod/chown FAQ entry (#1762) (#1765) (@mvanhorn)
  • docs: warn that _if must be a callable (#1771) (@wowi42)
  • docs: restore loop cycle error guidance (#1767) (@puneetdixit200)
  • docs: clarify fact-failure semantics for requires_command and check_preconditions (#1770) (@wowi42)
  • docs: correct python.raise_exception example (#1772) (@puneetdixit200)
  • docs: add BSD platform-specific instructions (#1754) (@evilham)
  • docs: convert docs to use zensical (#1713)
  • docs: add darkreader-lock
  • docs: remove redundant css and drop google fonts dependency
  • ci: update changelog generation

Other:

v3.8.0

Choose a tag to compare

@Fizzadar Fizzadar released this 04 May 12:28
Immutable release. Only release title and notes can be modified.
a35033c

Big release with a lot of fixes and improvements across the board! We're also switching to full semver (so .0 on the 3.8.0) for this release and others going forward. Thank you to all contributors!

Core:

  • api.command: fix make_formatted_string_command adding unwanted spaces between format args (#1610) (@wowi42)
  • api: decouple core API from click by introducing pluggable output functions (#1616) (@wowi42)

Operations/facts:

  • operations: expand quoting of user inputs to prevent command injection (#1576) (@wowi42)
  • facts.selinux.FileContext: handle missing SELinux context (#1581) (@wowi42)
  • facts.systemd: ensure that user-mode systemd facts do not fail if user manager is not available (#1604) (@martenlienen)
  • facts.apt.AptSources: add deb822 format support (#1465) (@maisim)
  • operations.files: expand diff output (#1552) (@gwelch-contegix)
  • facts.server: add Ports fact returning all listening ports (#1637) (@wowi42)
  • facts.choco: remove invalid shell_executable on ChocoPackages (#1598) (@wowi42)
  • operations.git.repo: add depth support (#1656) (@bsaussay)
  • operations.docker: add extra parameters (#1593) (@wowi42)
  • operations.selinux.port: fix a bug where the op would not find existing labels if sepolicy command was missing from the host (#1654) (@yacoob)
  • operations.server.reboot: survive dead SSH session during askpass cleanup (#1665) (@wowi42)
  • facts.docker: add version, container, image, network detail facts (#1668) (@wowi42)
  • facts.server: add AuthorizedKeys, make user_authorized_keys idempotent (#1670) (@wowi42)
  • facts.crontab: match full crontab(5) env var syntax (#1678) (@wowi42)
  • operations.files: add limit_rate to cap download bandwidth (#1681) (@wowi42)
  • operations.files: add files.unarchive (#1631) (@wowi42)
  • operations.docker: add support for custom command (#1625) (@EricDriussi)
  • facts.{yum,dnf,zypper}: add filename field to each repository entry (#1684) (@wowi42)
  • operations.server: dispatch BSD rc.d before sysvinit in server.service (#1685) (@wowi42)
  • operations.files.download: reconcile mode/user/group on existing files (#1687) (@wowi42)

Connectors:

  • connectors.ssh: fix parsing of SSH config file comments (#1574) (@wowi42)
  • connectors: use gevent.subprocess in util for macOS + Python 3.13 compatibility (#1653) (@Yaminyam)
  • connectors: show askpass generation errors (#1628) (@matthijskooijman)
  • connectors.ssh: honor ConnectTimeout through ProxyJump (#1679) (@wowi42)

Docs/meta:

  • docs: facts.opkg, operations.opkg - add note about Openwrt switch to apk (#1595) (@morrison12)
  • docs: fix extra trailing comma in operation argument lists (#1596) (@morrison12)
  • docs: fix missing keyword-only args in operations documentation (#1600) (@morrison12)
  • docs: fix generate_operations_docs.py and add docs build to CI (#1614) (@wowi42)
  • docs: operations.files - clarify template vars use (#1615) (@EricDriussi)
  • docs: update Python version requirements (#1627) (@pascal-cm)
  • docs: generate fact/operation docs for modules (vs files) (#1606) (@morrison12)
  • docs: clarify group_data/ is file-inventory only (#1696) (@wowi42)

Other:

  • facts+operations: add GpgKeyrings fact and gpg.* operations (#1460) (@maisim)
  • dependencies/paramiko: support paramiko v4, remove DSS key support (#1525) (@5long)
  • operations.server.mount fix not detecting already-mounted devices (#1611) (@wowi42)
  • facts+operations: add uv support (#1500) (@morrison12)
  • meta,api: lazy load fact and operation modules (#1609) (@Dexmachi)
  • facts,operations: migrate shlex.quote to StringCommand + QuoteString everywhere (#1617) (@wowi42)
  • operations+facts: server.Processes fact and server.kill operation (#1583) (@wowi42)
  • arguments: add dzdo support for privilege escalation, including CLI options and configuration. (#1633) (@guinuxbr)
  • zfs: return an empty dict if zfs/zpool commands are not available (#1650) (@yacoob)
  • meta,ci: make ruff checks in ci+dev-lint.sh consistent
  • progress: finish spinner as soon as possible (#1657) (@matthijskooijman)
  • feat: support SSH IdentityAgent config directive (#1630) (@wowi42)
  • security: quote untrusted values in command construction across connectors, operations, and util (#1664) (@wowi42)
  • ci: upgrade default Python to 3.14 (#1667) (@wowi42)
  • fix: Add timeout support in FunctionCommand (#1663) (@Tbruno25)
  • feat: add config.INHERIT_ENV to pass local process env vars to all op… (#1677) (@maisim)
  • Add support for using AI coding agents (#1672) (@DonDebonair)
  • fix(cli): exclude imports from group data (#1676) (@wowi42)
  • fix: scripts/generate_facts_docs: add canonical-name label for re-exported facts (#1686) (@wowi42)
  • fix(operations.git): don't pull when already up to date (#1690) (@wowi42)
  • feat(facts): add requires_command guard sentinel and check_preconditions() hook (@maisim)
  • feat(facts.zfs): add check_preconditions for ZfsDatasets and update command method (@maisim)
  • feat(operations.docker): add login/logout operations (#1694) (@wowi42)
  • feat(operations.docker): add compose operation (#1693) (@wowi42)
  • feat(operations.docker): add build operation (#1695) (@wowi42)
  • operations/facts: modernize apt.key to replace deprecated apt-key command (@maisim)
  • chore: make Claude use modern type hints (#1692) (@DonDebonair)
  • feat(apt): add purge option to apt.packages (closes #1698) (#1702) (@mvanhorn)
  • fix(facts): add semicolons to TmpDir shell script for sh -c compatibility (#1703) (@wucm667)
  • fix(operations.server): normalize sysctl value for comparison (#1706) (@wowi42)
  • feat: add PR review skill (#1683)

v3.7

Choose a tag to compare

@Fizzadar Fizzadar released this 12 Mar 10:55
Immutable release. Only release title and notes can be modified.
812a149

Thank you to all contributors - particular shout out to @wowi42 for an incredible run of PRs!

Core:

  • api.facts: fix requires_command shell operator precedence with compound commands (#1579) (@wowi42)

Operations/facts:

  • operations.docker: add support for env files (#1572) (@EricDriussi)
  • operations.docker: add support for dns (#1590) (@EricDriussi)
  • operations.files.sync: support symlinks
  • facts.server.Port: add UDP support and multi-platform backends (#1550) (@wowi42)
  • facts.hardware.Memory: use LANG=C while calling vmstat (#1553) (@soltysek)
  • facts.hardware: add CpuInfo fact (#1577) (@soltysek)
  • facts.server.Sysctl: fix non-zero exit code causing empty result (#1578) (@wowi42)
  • facts.runit.RunitManaged: handle missing service directory gracefully (#1580) (@wowi42)
  • facts.hardware.Memory: fix FreeBSD support by summing page categories (#1584) (@wowi42)
  • facts.server.SecurityLimits: handle missing limits.conf (#1582) (@wowi42)
  • facts.server.Port: fix ss command for Alpine/BusyBox compatibility (#1586) (@wowi42)
  • facts.iptables: add requires_command to all iptables facts (#1587) (@wowi42)
  • facts.opkg: add requires_command and stop hardcoding /bin/opkg (#1588) (@wowi42)
  • facts.choco: add requires_command to ChocoPackages and ChocoVersion (#1589) (@wowi42)

Connectors:

  • connectors: @podmanssh connector for remote Podman container operations (#1547) (@elazar)
  • connectors.ssh: exclude _chdir from global arguments used when removing temporary file (fix #1426) (#1429) (@morrison12)
  • connectors.ssh: don't include password in SSH exception authentication data (#1538) (@oliverhr)

CLI:

  • cli: use gevent for the progress spinner
  • cli: add --ssh-password-prompt flag for interactive SSH password input (#1585) (@wowi42)

Other:

  • global arguments: _su_password argument for su password authentication (#1573) (@wowi42)
  • operations+facts: server.timezone and server.Timezone fact (#1575) (@wowi42)
  • scripts: add generate_changelog.py

v3.6.1

Choose a tag to compare

@Fizzadar Fizzadar released this 02 Feb 13:47
Immutable release. Only release title and notes can be modified.
da3fd2b

Thank you to all contributors. A solid bugfix release including some rather old bugs at this point.

Core fixes:

  • api: handle/propagate nested operation errors
  • api: don't apply stage check in API mode
  • api: change iter_active_hosts -> get_active_hosts

Operation/fact fixes:

  • operations.docker.container: add support for --restart and --rm arguments (@levinion)
  • operations.postgres: add idempotency notice on passwords to postgres.role
  • facts.flatpak.FlatpakPackages: handle headless output correctly
  • facts.crontab: don't return non-command cron entries in get_command
  • facts.files.FileContents: fix return None when no file exists
  • facts.files.FindFiles: fix args parameter being ignored (@wowi42)

Connector fixes:

  • connectors.ssh: handle multiple known hosts files in SSH config

CLI fixes:

  • cli: fix missing config lock
  • cli: fix config flags lost on multiple deploy files (@wowi42)
  • cli/inventory: support loading host groups directly from module attributes (@wowi42)

Docs/meta:

  • docs: fix many minor errors (@romain-dartigues)
  • docs: fix typo in inventory-data.rst (@EshemMimi)
  • meta: add arguments linter
  • meta: fix dev linting scripts

v3.6

Choose a tag to compare

@Fizzadar Fizzadar released this 05 Jan 09:58
Immutable release. Only release title and notes can be modified.
5291e90

First 2026 release - Happy New Year all! Thank you to all contributors. One big highlight is new metadata spec for plugins, this is the start of better discovery and documentation generation for third party facts and operations:

  • add metadata spec for pyinfra plugins (@rod7760)

New and updated operations/facts:

  • operations: add _temp_dir global argument for configuring temp directory (@wowi42)
  • operations: add files.copy operation (@EricDriussi)
  • operations.crontab: fix modification not properly relying on the cron_name parameter (@information-redacted)
  • operations.docker.container: add support for setting labels (@spookyvision)
  • operations: add import statements on at least one example of every operation (@mkinney)
  • operations.docker.image: make operation idempotent (@DonDebonair)
  • operations.files.template: allow custom jinja2 template loaders (@DaRasch)
  • operations.files.block/connectors.util: use correct temporary directory (@morrison12)
  • operations.util.packaging: allow empty package list in ensure_packages (@schenker)
  • operations: fix tmpdir to properly use all the POSIX environment variables (@wowi42)
  • facts.files.FileContents: improve docstring (@adonm)
  • facts.apt.update: fix computation of cache_time when host is not UTC (@philippemilink)
  • facts: add FactProcessError to log, not explode, issues processing facts (@NichtJens)
  • facts.npm: check directory exists before cd-ing (wowi42)

Connectors:

  • connectors.docker: add platform and architecture option via connector data (@JP-Ellis)
  • connectors: close stdin after writing any input
  • connectors.ssh: add workaround for paramiko no session error (@dfaerch)

CLI:

  • cli: change color of "No changes" to cyan
  • cli: add option --same-sudo-password (@philippemilink)

Docs/meta:

  • docs: replace python -m with uv run -m (@JP-Ellis)
  • docs: fix URLs in API documentation (@kelno)
  • docs/connectors: document command wrapping and parameter filtering best practices (@elazar)
  • tests: freeze date for fact tests

v3.5.1

Choose a tag to compare

@Fizzadar Fizzadar released this 01 Oct 16:11
Immutable release. Only release title and notes can be modified.
a620527

Patch release with a bunch of great fixes. But notably want to call out two major changes for anyone working on the pyinfra code itself (huge thank you Daan for implementing these):

  • feat: use ruff for linting and formatting (@DonDebonair)
  • feat: use uv for project and dependency management (@DonDebonair)

Core fixes:

  • api: correctly set context state+host when calling get_facts
  • cli: catch exceptions when testing inventory/operation imports
  • cli: fix/remove datetime timezone warnings (@wowi42)
  • operations/files.block: correct behaviour when markers/block not found and no line provided (@morrison12)
  • operations.util.packaging: extend PkgInfo for winget (@rod7760)
  • facts/server: support negative value in sysctl (@imlonghao)

Docs:

  • docs: fix dynamic execution example (@wowi42)
  • docs: Specify how the recursive argument to directory() works (@cliffmccarthy)
  • docs: change recommended installation methods (@DonDebonair)
  • docs: update writing connectors

Tests:

  • op.server.user tests: add exists_noop.json for user existence checks (fix warning) (@maisim)
  • op.server.user tests: add noop_description (fix warning) (@maisim)
  • fix: add missing command field in test (@maisim)
  • tests: clear the host sftp memoization cache before setting up the mock (@wowi42)
  • tests: export testgen class to a new package/repo
  • tests: fix missing stage sets on state

v3.5

Choose a tag to compare

@Fizzadar Fizzadar released this 03 Sep 10:26
eb0e683

New release with some really awesome new features, brought to you by the fantastic contributions of the community. New stuff:

  • add --diff argument to show file diffs for potential file changes (@jgelens)
  • add _retries, _retry_delay and _retry_until global arguments (@shohamd4)
  • parallelize disconnecting from hosts (@gwelch-contegix)
  • enable using SCP instead of SFTP for SSH file transfers (@DonDebonair)

New and updated operations/facts:

  • facts/server: add RebootRequired fact (@wowi42)
  • operations/pip: support PEP-508 package versions (@morrison12)
  • operations+facts/docker: add Docker plugin support (@DonDebonair)
  • operations/files.put: add atime and mtime arguments (@vram0gh2)
  • operations/openrc: support runlevel when enabling services (@sengo4hd)
  • facts/yum+dnf+zypper: return repoid in repository facts

Operation/fact fixes:

  • facts/files.File: add ls fallback support (@mrkbac)
  • operations/openrc: add missing noop messages (@sengo4hd)
  • operations/server.crontab: fix newline when replacing existing values (@Nananas)
  • operations/files.block: fix examples doc (@morrison12)
  • operations/files.block: fix case where file exists but line is missing (@morrison12)
  • operations/files.block: improve handling of special characters in marker lines (@morrison12)

Internal/meta:

v3.4.1

Choose a tag to compare

@Fizzadar Fizzadar released this 14 Jul 20:32
e064e8b
  • fix config context when getting operation arguments