Skip to content

Releases: pyinfra-dev/pyinfra

v1.0.1

13 Jul 21:18
93efd0d
Compare
Choose a tag to compare
  • Log host fact errors/warnings
  • Switch to distro package for linux_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

11 Jul 13:20
9d45a81
Compare
Choose a tag to compare

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 (deprecate set 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 and add_deploy functions
  • [API] Return a dictionary of host -> OperationMeta when using add_op
  • Enable passing a list of modules to server.modprobe (@FooBarQuaxx)
  • Support Path objects in files.[file|directory|link] operations
  • Support shasum (MacOS) in sha1_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 argument name -> id
  • Rename git.repo argumenets source -> src & target -> dest
  • Rename iptables.chain argument name -> chain
  • Rename python.call argument func -> function
  • Rename size -> mask_bits inside network_devices fact
  • Change default of interpolate_variables from True -> False
  • Remove deprecatedhosts/when/op global operation arguments
  • Rename reprecated Config.TIMEOUT -> Config.CONNECT_TIMEOUT
  • Remove deprecated use_ssh_user argument from git.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

09 Jul 16:01
e7c397e
Compare
Choose a tag to compare
  • Add special_time argument to server.crontab operation
  • Support public key filenames in server.user
  • Support BusyBox style ls time formats for file/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

03 Jul 15:20
50e2efd
Compare
Choose a tag to compare
  • Declare connectors as setuptools entrypoints (@FooBarQuaxx)
  • Fix use_sudo_password with facts
  • Fix actually mask MySQL operation + facts output

v0.16

29 Jun 20:47
8a62162
Compare
Choose a tag to compare
  • 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 provide PKG_PATH envvar if /etc/installurl exists
  • Load any SSH certificates when loading private keys

v0.15

21 Jun 20:34
6e14b03
Compare
Choose a tag to compare

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])
  • Enable managing all systemd unit types (not just service) (@nikaro)
  • Enable using venv instead of virtualenv (@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 in pkg.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

18 Jun 09:54
73c98a6
Compare
Choose a tag to compare
v0.14.5

pyinfra v0.8

03 Mar 12:28
Compare
Choose a tag to compare

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

28 Aug 08:36
Compare
Choose a tag to compare

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
  • Add postgresql module
    • Operations: postgresql.sql, postgresql.role, postgresql.database, postgresql.dump, postgresql.load
    • Facts: postgresql_databases, postgresql_roles
  • Add puppet module with puppet.agent operation (@tobald)
  • Add server.crontab, server.modprobe and server.hostname operations
  • Add git.config operation
  • Add kernel_modules, crontab and git_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
  • Deprecate state.limit and replace with state.hosts(hosts) (consistency with global operation kwarg hosts not limit)
  • Major internal refactor of AttrData handling to reduce operation branching:
    • Generate AttrData on creation, rather than read
    • Add nesting support for AttrData so host.data.thing['X'] will not create branching operations
    • Turn fact data into AttrData
    • Make host.name an AttrDataStr
    • Hash True, False and None constants as the same so they can change between hosts without branching operations
    • Update docs and warning on operation branching
  • Better default for pool parallel size
  • Show stdout if stderr is empty on command failure (surprisingly common)

pyinfra v0.6.1

25 Feb 14:53
Compare
Choose a tag to compare

Changes in 0.6.1:

  • Fix file "uploading" for the @local connector