Releases: pyinfra-dev/pyinfra
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
v0.14.5
pyinfra v0.8
Another major internal release that re-works how operations are ordered such that operation arguments no longer need to be the same for each host. This works by using the line numbers on which operations are defined, nesting as required.
pyinfra v0.7
This is a huge step forward for pyinfra; as well as a bunch of key new modules and a new progress bar that highlights what's pending, pyinfra now compiles deploy code so if
statements work as expected (no need to use the with state.limit
workaround).
Changes in 0.7:
- Add mysql module
- Operations:
mysql.sql
,mysql.user
,mysql.database
,mysql.privileges
,mysql.dump
,mysql.load
- Facts:
mysql_databases
,mysql_users
,mysql_user_grants
- Operations:
- Add postgresql module
- Operations:
postgresql.sql
,postgresql.role
,postgresql.database
,postgresql.dump
,postgresql.load
- Facts:
postgresql_databases
,postgresql_roles
- Operations:
- Add puppet module with
puppet.agent
operation (@tobald) - Add
server.crontab
,server.modprobe
andserver.hostname
operations - Add
git.config
operation - Add
kernel_modules
,crontab
andgit_config
facts - Add global install virtualenv support (like iPython)
- Massively improved progress bar which highlights remaining hosts and tracks progress per operation or fact
- Improved SSH config parsing, including proxyjump support (@tobald)
- Support for CONFIG variables defined in
local.include
files - Fix
command
fact now outputs everything not just the first line
Internal changes:
- Replace
--debug-state
with--debug-operations
and--debug-facts
- pyinfra now compiles the top-level scope of deploy code, meaning if statements no longer generate imbalanced operations
- This means the recommendations to use
state.when
in place of conditional statements is invalid - Updated the warning shown, now once, with a link
- Included a test
deploy_branches.py
which can be used to verify operations do run in order for each host when compile is disabled - Compiling can be disabled by setting
PYINFRA_COMPILE=off
environment variable
- This means the recommendations to use
- Deprecate
state.limit
and replace withstate.hosts(hosts)
(consistency with global operation kwarghosts
notlimit
) - Major internal refactor of
AttrData
handling to reduce operation branching:- Generate
AttrData
on creation, rather than read - Add nesting support for
AttrData
sohost.data.thing['X']
will not create branching operations - Turn fact data into
AttrData
- Make
host.name
anAttrDataStr
- Hash
True
,False
andNone
constants as the same so they can change between hosts without branching operations - Update docs and warning on operation branching
- Generate
- Better default for pool parallel size
- Show stdout if stderr is empty on command failure (surprisingly common)