pyinfra turns Python code into shell commands and runs them on your servers. Execute ad-hoc commands and write declarative operations. Target SSH servers, local machine and Docker containers. Fast and scales from one server to thousands.
dpkg
output parsing in deb.DebPackages
fact (@martenlienen)--local-only
flag in choco.ChocoPackages
factdestination
& not_destination
args in iptables.rule
operationWelcome 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:
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.
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
).
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...
Long overdue! Happy New Year all :)
Added:
server.security_limit
operation & SecurityLimits
fact (@maisim)password
argument to server.user
operation (@disser)url
argument to brew.tap
operation (@znd4)proxy
argument to files.download
operation (@themanifold)NetworkDevices
fact (@maisim)Fixed:
Users
fact when user description contains pipes (@julienlavergne)files.block
operation (@stone-w4tch3r)server.reboot
operation (@stone-w4tch3r)server.user
(@julienlavergne)Added:
device
and fs_type
arguments to server.mount
operation (@chriskingio)args
argument to server.script_template
operation (@chriskingio)Fixed:
server.user
& server.group
operations (@wowi42)py.typed
flag to package.
in the name (@cawo-odoo)mysql.database
operation (@tissieres)Been a while since a release, so there's a bunch of great stuff in thise one!
Added:
caro.packages
operation (@wowi42)server.locale
operation and server.Locales
fact (@maisim)ensure_newline
keyword argument to files.line
(@yunzheng)args
argument to server.script
operationput_file
work with doas
(@minusf)Fixed:
line.replace
(@sysadmin75)server.users
operation (@minusf)snap.packages
operation (@pabloxio)distro>1.6
and remove patch hackfiles.Md5File
fact for BSD style output (@ScottKevill)protocol
in iptables.rule
operation (@sysadmin75)Host
methodsserver.script
operation (@link2xt)Added:
files.rsync
operation (@StevenKGER)auto_remove
arguments to apt.upgrade
operation (@mcataford)Fixed:
mysql.privileges
operation (@gchazot)mysql.load
operation with spaces in filenames (@gchazot)apk.ApkPackages
for packages with numbers in the name (@dchauviere)openrc.OpenrcStatus
for services with start times (@dchauviere)files.put
for files containing spaces in local connector (@uggedal)Host.loop
position tracking