Releases: pyinfra-dev/pyinfra
v1.1
This is a big release with some major additions & improvements on v1
.
Highlights:
- Start modifying facts during fact gathering phase, resolving common issues with interdependent operations, expand documentation on this (docs)
- Implement state callback classes dramatically improving the API experience (see
examples/api_deploy.py
) - Add
@dockerssh
connector that enables pyinfra to build Docker containers on remote machines over SSH (@charles-l) - Add global
precondition
andpostcondition
operation arguments - Fix using
su_user
on BSD/MacOS systems - Rework verbosity flags and add noop logging (ie package X is already installed) (docs)
Notable change:
The yum.packages
and dnf.packages
operations have changed their "version join" string value - both package managers use -
to join name + version while allowing -
in the name. This leads to ambiguous behaviour for packages containing dashes, as such the version join value has been changed to =
- meaning it can now actually be used! This means to specify a specific version of a yum/dnf package you should use <name>=<version>
rather than <name>-<version>
.
Smaller bits:
- Add
REQUIRE_PYINFRA_VERSION
config option (& deprecateMIN_PYINFRA_VERSION
) - Validate existing files in
file.download
with checksum arguments (@sysadmin75) - Stop stripping fact output (fixes
command
fact, @sysadmin75) - Add
extra_install_args
andextra_uninstall_args
kwargs toapt.packages
operation - Add
--use-sudo-password
CLI argument - Normalise
server.sysctl
handling of string/int values - Improve autocomplete/intellisense handling of pseudo modules
pyinfra.[host|state|inventory]
- Fix using sudo password with a SSH user that doesn't have access to
/tmp
- Fix
python.call
docstring (@leahneukirchen) - Fix
--serial
and--no-wait
executing operations twice - Fix
server.sysctl
usage with multiple values
v1.0.4
- Add
selinux
fact (@FooBarQuaxx) - Improve/fix
rpm_packages
fact parsing (@FooBarQuaxx) - Stop showing arguments on operations with names
v1.0.3
- Reimplement
file
/directory
/link
facts usingstat
- No breaking changes
- Adds
ctime
andatime
to the output dictionary
- Add
backup
argument to thefiles.line
andfiles.replace
operations - Add
SimpleNamespace
to the list of allowed data types - Don't fail when the destination directory is a symlink in the
files.sync
operation - Fix running the same fact in CLI w/different arguments
- Add local integration tests that check idempotency (of files operations only for now)
v1.0.2
- Further improve fact output when errors are encountered
- Will now output stdout + stderr when a fact command fails unexpectedly
- This brings the same instant debugging feel to facts that operations have
- Fix
wget
failure handling infiles.download
operation (@artizirk) - Improve files facts handling when file/directory/link does not exist
v1.0.1
- Log host fact errors/warnings
- Switch to
distro
package forlinux_distribution
fact (@FooBarQuaxx) - Expand support for
os.PathLike
path variables (@FooBarQuaxx) - Improve checking state/host presence when calling operations (@FooBarQuaxx)
- Don't error in
sha1_file
fact when no file exists
v1.0
The first 1.x
release!
This release deprecates a lot of old/legacy pyinfra
code and brings fourth a new, stable API. So long as you see no warnings when executing pyinfra
, upgrading should require no chanages.
What's new:
- Add new global
name
argument to name operations (deprecateset
as the first argument) - Improve unexpected fact error handling, bad exit codes will be treated as errors unless the fact explicitly expects this could happen (system package managers for example)
- [CLI] write progress/user info/logs to
stderr
only - [API] Consistent ordering when
add_op
andadd_deploy
functions - [API] Return a dictionary of
host
->OperationMeta
when usingadd_op
- Enable passing a list of modules to
server.modprobe
(@FooBarQuaxx) - Support
Path
objects infiles.[file|directory|link]
operations - Support
shasum
(MacOS) insha1_file
fact
Breaking changes:
- Deprecate using
set
as the first/name argument for operations - Rename
files.*
arguments (name
->path
,destination
->dest
) - Rename
server.*
arguments (name
->user|group|cron_name|key|path
,filename
->src
) - Rename
mysql.*
+postgresql.*
arguments (name
->user|database|role
) - Rename
init.*
arguments (name
->service
) - Rename
lxd.container
argumentname
->id
- Rename
git.repo
argumenetssource
->src
&target
->dest
- Rename
iptables.chain
argumentname
->chain
- Rename
python.call
argumentfunc
->function
- Rename
size
->mask_bits
insidenetwork_devices
fact - Change default of
interpolate_variables
fromTrue
->False
- Remove deprecated
hosts
/when
/op
global operation arguments - Rename reprecated
Config.TIMEOUT
->Config.CONNECT_TIMEOUT
- Remove deprecated
use_ssh_user
argument fromgit.repo
operation - Remove deprecated
python.execute
operation - Remove deprecated
Inventory.<__getitem__>
&Inventory.<__getattr__>
methods - Remove deprecated
add_limited_op
function - Remove deprecated legacy CLI support
v0.16.2
- Add
special_time
argument toserver.crontab
operation - Support public key filenames in
server.user
- Support BusyBox style
ls
time formats forfile
/directory
/link
facts - Fix uninstalling packages with
pip.packages
(@FooBarQuaxx) - Fix compatibility with older gevent versions
- Fix typo in deploys doc (@harold-b)
v0.16.1
- Declare connectors as setuptools entrypoints (@FooBarQuaxx)
- Fix
use_sudo_password
with facts - Fix actually mask MySQL operation + facts output
v0.16
- Add zypper module (@FooBarQuaxx)
- Add xbps module (@leahneukirchen)
- Add first command class,
StringCommand
, with masking support (@meantheory)- Mask postgresql, mysql and sudo passwords
- Fix
pkg.packages
: don't providePKG_PATH
envvar if/etc/installurl
exists - Load any SSH certificates when loading private keys
v0.15
To-be-breaking changes:
- Rename
pyinfra.modules
->pyinfra.operations
(backwards compatible, will remain in v1)
Other changes:
- Add
use_sudo_password=[True|False|str]
global operation argument - Support YAML+JSON
@ansible
connector inventories (@ricardbejarano)- requires
pyyaml
which is an extra requirement (pip install pyinfra[ansible]
)
- requires
- Enable managing all systemd unit types (not just service) (@nikaro)
- Enable using
venv
instead ofvirtualenv
(@nikaro) - Add
@chroot
connector (@FooBarQuaxx) - Don't include comment lines in
yum_repositories
fact (@FooBarQuaxx) - Use
tail -f /dev/null
instead of sleep for@docker
containers (@FooBarQuaxx) - Support
pkg ...
FreeBSD commands inpkg.packages
operation + fact - Support non-RSA key files (DSS/ECDSA/Ed25519)
- Python2 unicode fixes for
files
operations + facts - Properly escape/support paths with spaces
- Add python3.8 to travis tests