Releases: pyinfra-dev/pyinfra
v3.0.1
- Switch to
command -vnotwhichinserver.Whichfact (@lemmi) - Fix detection of xbps in
server.packagesoperation (@romain-dartigues) - Fix argument typo in operations doc (@scoufman)
- Add expanded note about detected changes + hidden side effects during execution
- Fix missing global arguments in group data files
- Fix
--group-dataCLI argument behaviour - Remove unused/dead
--quietflag
v3.0
Welcome to pyinfra v3! This version is the biggest overhaul of pyinfra since it was created back in 2015. Most v2 deployment code should be automatically compatible, but as always be aware. Major changes:
Runtime operation execution
pyinfra now executes operations at runtime, rather than pre-generating commands. Although the change isn't noticeable this fixes an entire class of bugs and confusion. See the limitations section in the v2 docs. All of those issues are now a thing of the past.
This represents a huge overhaul of pyinfra's internals and should be a huge improvement for users.
Care has been taken to reduce the overhead of this change which still supports the same diffs and change proposal mechanism.
CLI flow & prompts
The pyinfra CLI will now prompt (instead of ignore, or immediately exit) when problems are encountered, allowing the user to choose to continue. Additionally an approval step is added before executing changes (this can be skipped with -y or setting the PYINFRA_YES environment variable).
Extendable connectors API, typing overhaul
v3 of pyinfra includes for the first time a (mostly) typed internal API with proper support for IDE linting. There's a whole new connectors API that provides a framework for building new connectors.
Breaking changes
- Rename
_use_sudo_passwordargument to_sudo_password - Remove
winrmconnector andwindows*operations/facts, moving topyinfra-windows - The deploy decorator must now be called, ie used as
@deploy(), and is now typed - Remove broken Ansible inventory connector
Operations & Facts
- Add
docker.container,docker.image,docker.volume,docker.network&docker.pruneoperations (@apecnascimento) - Add
runit.serviceoperation andRunitStatusfact (@lemmi) - Add
TmpDirfact - Add
servicesargument to systemd facts for filtering - Add type hints for all the operations (@stone-w4tch3r)
- Lowercase pip packages properly (PEP-0426)
- Rename
postgresql->postgresoperations & facts (old ones still work) - Improve IP/MAC parsing in
NetworkDevicesfact (@sudoBash418) - Enable getting
Homefact for other users (@matthijskooijman) - Use users correct home directory in
server.user_authorized_keysoperation (@matthijskooijman) - Fix
destination/not_destinationarguments iniptables.ruleoperation - Fix remote dirs when executing from Windows in
files.syncoperation (@Renerick) - Fix quoting of systemd unit names (@martenlienen)
Other Changes
- Add new
_ifglobal argument to control operation execution at runtime - Add
--debug-allflag to set debug logging for all packages - Retry SSH connections on failure (configurable, see SSH connector) (@fwiesel)
- Documentation typo fixes (@szepeviktor, @sudoBash418)
- Fix handling of binary files in Docker connector (@matthijskooijman)
- Add
will_changeattribute anddid_changecontext manager toOperationMeta - Replace use of
pkg_resourceswithimportlib.metadata(@diazona) - Fix identifying Python inventory files as modules (@martenlienen)
- Fix typed arguments order (@cdleonard)
- Check that fact commands don't take global arguments (@martenlienen)
v3.0.beta2
Welcome to pyinfra v3! This version is the biggest overhaul of pyinfra since it was created back in 2015. Most v2 deployment code should be automatically compatible, but as always be aware. Major changes:
Runtime operation execution
pyinfra now executes operations at runtime, rather than pre-generating commands. Although the change isn't noticeable this fixes an entire class of bugs and confusion. See the limitations section in the v2 docs. All of those issues are now a thing of the past.
This represents a huge overhaul of pyinfra's internals and should be a huge improvement for users.
Care has been taken to reduce the overhead of this change which still supports the same diffs and change proposal mechanism.
CLI flow & prompts
The pyinfra CLI will now prompt (instead of ignore, or immediately exit) when problems are encountered, allowing the user to choose to continue. Additionally an approval step is added before executing changes (skip with -y).
Extendable connectors API, typing overhaul
v3 of pyinfra includes for the first time a (mostly) typed internal API with proper support for IDE linting. There's a whole new connectors API that provides a framework for building new connectors.
More TBC...
v2.9.2
v2.9.1
- Add ability to retry SSH connections on failure (@fwiesel)
- Handle nested operation errors correctly like unnested operations
- Display list of valid Terraform keys when no match
- Fix tab aligned
dpkgoutput parsing indeb.DebPackagesfact (@martenlienen) - Fix support page chat link
- Fix default argument checking when looking up arguments from host data
- Fix duplicate traceback printing in callback operations
- Fix use of removed
--local-onlyflag inchoco.ChocoPackagesfact - Fix sudo no user regex when calling facts
- Fix missing use of
destination¬_destinationargs iniptables.ruleoperation
v3.0 beta0!
Welcome to pyinfra v3! This version is the biggest overhaul of pyinfra since it was created back in 2015. Most v2 deployment code should be automatically compatible, but as always be aware. Major changes:
Runtime operation execution
pyinfra now executes operations at runtime, rather than pre-generating commands. Although the change isn't noticeable this fixes an entire class of bugs and confusion. See the limitations section in the v2 docs. All of those issues are now a thing of the past.
This represents a huge overhaul of pyinfra's internals and should be a huge improvement for users.
Care has been taken to reduce the overhead of this change which still supports the same diffs and change proposal mechanism.
CLI flow & prompts
The pyinfra CLI will now prompt (instead of ignore, or immediately exit) when problems are encountered, allowing the user to choose to continue. Additionally an approval step is added before executing changes (skip with -y).
Extendable connectors API, typing overhaul
v3 of pyinfra includes for the first time a (mostly) typed internal API with proper support for IDE linting. There's a whole new connectors API that provides a framework for building new connectors.
More TBC...
v2.9
Long overdue! Happy New Year all :)
Added:
- Add
server.security_limitoperation &SecurityLimitsfact (@maisim) - Add
passwordargument toserver.useroperation (@disser) - Add
urlargument tobrew.tapoperation (@znd4) - Add
proxyargument tofiles.downloadoperation (@themanifold) - Add mtu, state, mac to
NetworkDevicesfact (@maisim) - Enable/test paramiko v3 support (@pbsds)
Fixed:
- Fix
Usersfact when user description contains pipes (@julienlavergne) - Fix multiple bugs in
files.blockoperation (@stone-w4tch3r) - Fix removal of sudo askpass file with
server.rebootoperation (@stone-w4tch3r) - Disable home creation explicitly in
server.user(@julienlavergne) - Remove unused colorama dependency (@gdrosos)
- Automatically convert string/bytes IO objects to the correct mode
v2.8
Added:
- Add
deviceandfs_typearguments toserver.mountoperation (@chriskingio) - Add
argsargument toserver.script_templateoperation (@chriskingio)
Fixed:
- Support FreeBSD in
server.user&server.groupoperations (@wowi42) - Add missing
py.typedflag to package - Fix lookup of systemd units containing
.in the name (@cawo-odoo) - Strip newlines off public keys read from disk (@sysadmin75)
- Properly escape database names in
mysql.databaseoperation (@tissieres)
v2.7
Been a while since a release, so there's a bunch of great stuff in thise one!
Added:
- Add experimental support for importing inventories from Python modules
- Add
caro.packagesoperation (@wowi42) - Add
server.localeoperation andserver.Localesfact (@maisim) - Add
ensure_newlinekeyword argument tofiles.line(@yunzheng) - Add
argsargument toserver.scriptoperation - Add make
put_filework withdoas(@minusf) - Handle adding git config key-values with multiple lines (@gchazot)
Fixed:
- Add Ubuntu latest (22.04) to CI tests (@gchazot)
- Fix codecov workflow (@ioO)
- Escape & character during sed replacement during
line.replace(@sysadmin75) - Fix last login time in
server.usersoperation (@minusf) - Fix fact hash for short facts where the backing fact takes arguments
v2.6.2
- Add support for classic confinment in
snap.packagesoperation (@pabloxio) - Support dictionaries for Terraform connector inventory
- Upgrade to
distro>1.6and remove patch hack - Fix
files.Md5Filefact for BSD style output (@ScottKevill) - Fix handling of
protocoliniptables.ruleoperation (@sysadmin75) - Fix a large number of documentation issues
- Add docstrings to
Hostmethods - Cleanup duplicate code (@minusf)
- Refactor has files facts (@ScottKevill)