Skip to content

Releases: pyinfra-dev/pyinfra

v2.0

Choose a tag to compare

@Fizzadar Fizzadar released this 09 Apr 19:42
f9237f1

pyinfra automates/provisions/manages/deploys infrastructure. It can be used for ad-hoc command execution, service deployment, configuration management and more. See the readme for more information.

The first 2.x release! Like v0 -> v1 this release mostly removes legacy APIs and methods which show warnings in v1. Major changes:

Breaking: Python 2.7 (finally!), 3.5 support dropped, Python 3.6 is now the minimum required version.

Breaking: the "deploy directory" concept has been removed - everything now executes from the current working directory which removes the ambiguous magic v1 used to pick a deploy directory. A new --chdir CLI flag has been added to set the working directory before pyinfra executes.

This may affect scripts or CI workflows currently setup, for example:

# Old v1, deploy directory becomes deploys/elasticsearch/
pyinfra deploys/elasticsearch/inventories/production.py deploys/elasticsearch/deploy.py

# New v2, explicit chdir required
pyinfra --chdir deploys/elasticsearch/ inventories/production.py deploy.py

Parallel operation generation & facts rewrite - this is a huge improvement to how pyinfra generates commands to run on target hosts. This is now run in parallel across all hosts. Facts are now collected by individual host rather than across all hosts which may yield significant speedups in certain situations.

This change also brings support for all of the execution global arguments to facts, and hugely simplifies the facts implementation. Global arguments will now be read from host data in exactly the same way they are for operations, which was often a confusing gotcha in v1. This also means that the arguments can have different values for each host and this will not cause issues.

Other breaking changes (warnings shown in v1 for most):

  • Non-existent host data raises an AttributeError when accessed via host.data.X
  • Change default branch argument to None in git.repo operation
  • present argument removed from mysql.privileges operation
  • Config variables must now be set on the global config object
  • Old style host.fact.fact_name access has been removed
  • The legacy init.* operations have been removed
  • Stop lowercasing package names in facts & operations
  • Remove --facts and --operations CLI flags
  • Remove --debug-data CLI flag
  • Remove Windows prefix on all Windows facts
  • Rename name argument to path in windows_files.* operations
  • Remove support for jinja2 template parsing in string arguments
  • Remove old pyinfra.modules module/import
  • Remove config.MIN_PYINFRA_VERSION
  • Remove branch and create_branch arguments in git.worktree operation
  • Remove touch_periodic argument in apt.update operation (never used)
  • pyinfra.api.connectors module moved to pyinfra.connectors

Deprecated (showing warnings, to be removed in v3):

  • state and host arguments no longer need to be passed into operation or deploy functions
  • postgresql_* arguments renamed to psql_* in postgresql.* operations & facts

v1.7.3

Choose a tag to compare

@Fizzadar Fizzadar released this 09 Apr 18:00
e4a41c8
  • Basename files before appending to backup directory
  • Fix operation ordering when executing multiple files

v2.0rc1

v2.0rc1 Pre-release
Pre-release

Choose a tag to compare

@Fizzadar Fizzadar released this 30 Mar 10:32
a3bd5ea
v2.0rc1

v1.7.2

Choose a tag to compare

@Fizzadar Fizzadar released this 27 Mar 18:59
ae55522
  • Revert legend flag change in Systemd* facts

v1.7.1

Choose a tag to compare

@Fizzadar Fizzadar released this 26 Mar 14:31
3bdfe14
  • Escape exported env variables (@lun-4)
  • Expand units Systemd* facts pick up (@jmpolom)
  • Deprecate match, replace with text in files.replace operation
  • Show warnings for removal of present argument in mysql.privileges operation in v2
  • Import top level os to avoid confusion in files operation module

v1.7

Choose a tag to compare

@Fizzadar Fizzadar released this 06 Mar 13:30
8578430
  • Add --user and --machine flags to systemd.* operations (@jmpolom)
  • Fix treat Zypper package names as case-sensitive (@sysadmin75)
  • Fix CLI flags with click<7.0 (@gchazot)
  • Fix automatic sudo check when get_pty=True
  • Fix respect config.TEMP_DIR setting for sudo file up/downloads

v1.6.3

Choose a tag to compare

@Fizzadar Fizzadar released this 19 Feb 18:35
233a779
  • Enable passing success_exit_codes into host.get_fact calls (@mohsinhijazee)
  • Fix bug triggered when no SSH config file exists

v1.6.2

Choose a tag to compare

@Fizzadar Fizzadar released this 18 Feb 14:23
c8e2f85

SSH connector config fixes:

  • Implement & fix StrictHostKeyChecking matching how OpenSSH works (@bauen1)
  • Fix / use SSH config for ProxyJump hosts (@artizirk)
  • Add ways to disable SSH agent / looking for SSH keys (host.data.ssh_allow_agent & host.data.ssh_look_for_keys)
  • Fix Match exec SSH config

Operation/fact fixes:

  • Set LC_TIME in server.Date fact
  • Use a temporary file + move in files.download operation

Misc:

  • Workaround fix for host.data.env not being a dictionary
  • Workaround fix for host.data.use_sudo_password being different for each host
  • Fix bash autocomplete documentation (@oz123)
  • Fix incorrect handling of internal errors when hosts fail
  • Refreshed logo/readme/docs/website for upcoming v2

v1.6.1

Choose a tag to compare

@Fizzadar Fizzadar released this 08 Jan 18:25
ff0913d
  • Fix typo bug in the SSH client preventing connection

v1.6

Choose a tag to compare

@Fizzadar Fizzadar released this 08 Jan 18:12
080bc8e

A small release with a few features and fixes. Future development will utilise smaller, more regular releases to avoid long gaps waiting on feature X to be complete.

This release also changes the git branching model to use current for anything non-breaking, and the next branch now targets the next major version. This should avoid unncessary confusion for the wonderful contributors to pyinfra.

Operations:

  • Make it possible to load relative (to CWD) templates (includes/bases/etc) (@themanifold)
  • Add apt.dist_update operation (@bauen1)
  • Fix files.Link fact & files.link operation where path pre-exists and is not a link

Connectors:

  • Support setting shell_executable=None to pass raw commands to the target (@KuxaBeast)
  • Fix handling of SSH proxy jump config
  • Only load SSH host keys once
  • Make it possible to specify a SSH config file via host.data.ssh_config_file