Releases: pyinfra-dev/pyinfra
v2.0.2
v2.0.1
- Rewrite & fix/speedup
systemdfacts usingsystemctl show - Support passing IO-like objects into
files.templateoperation - Support
accept-newSSH config forStrictHostKeyChecking - Fix hashing of facts with non-keyword arguments
- Fix connect to non-connected hosts before collecting facts
- Fix
config.REQUIRE_PYINFRA_VERSION&config.REQUIRE_PACKAGEShandling - Many little docs improvements
v2.0
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.pyParallel 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
AttributeErrorwhen accessed viahost.data.X - Change default
branchargument toNoneingit.repooperation presentargument removed frommysql.privilegesoperation- Config variables must now be set on the global
configobject - Old style
host.fact.fact_nameaccess has been removed - The legacy
init.*operations have been removed - Stop lowercasing package names in facts & operations
- Remove
--factsand--operationsCLI flags - Remove
--debug-dataCLI flag - Remove
Windowsprefix on all Windows facts - Rename
nameargument topathinwindows_files.*operations - Remove support for jinja2 template parsing in string arguments
- Remove old
pyinfra.modulesmodule/import - Remove
config.MIN_PYINFRA_VERSION - Remove
branchandcreate_brancharguments ingit.worktreeoperation - Remove
touch_periodicargument inapt.updateoperation (never used) pyinfra.api.connectorsmodule moved topyinfra.connectors
Deprecated (showing warnings, to be removed in v3):
stateandhostarguments no longer need to be passed into operation or deploy functionspostgresql_*arguments renamed topsql_*inpostgresql.*operations & facts
v1.7.3
v2.0rc1
v1.7.2
v1.7.1
v1.7
- Add
--userand--machineflags tosystemd.*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_DIRsetting for sudo file up/downloads
v1.6.3
- Enable passing
success_exit_codesintohost.get_factcalls (@mohsinhijazee) - Fix bug triggered when no SSH config file exists
v1.6.2
SSH connector config fixes:
- Implement & fix
StrictHostKeyCheckingmatching how OpenSSH works (@bauen1) - Fix / use SSH config for
ProxyJumphosts (@artizirk) - Add ways to disable SSH agent / looking for SSH keys (
host.data.ssh_allow_agent&host.data.ssh_look_for_keys) - Fix
Match execSSH config
Operation/fact fixes:
- Set
LC_TIMEinserver.Datefact - Use a temporary file + move in
files.downloadoperation
Misc:
- Workaround fix for
host.data.envnot being a dictionary - Workaround fix for
host.data.use_sudo_passwordbeing 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