# Release 0.59

:material-calendar: 2024-10-23 · :material-list-status: [Full Changelog](https://github.com/srl-labs/containerlab/releases)

## Per-stage exec hooks

Back in 0.51 when we introduced the stages support every stage had a single exec hook that allowed you to execute a command in a container when it enters/exits a stage. It was a good start, but it had one hole in it - it was not possible to execute a command on a host machine when a container enters/exits a particular stage.

Thanks to @steiler the stages support for execs became much more powerful in this release with allowing you to flexibly define where command is executed (host or container) and when (what stage and what event). Here is an example of a refactored exec hooks:

```yaml
nodes:
  node1:
    stages:
      create-links:
        exec:
          - command: ls /sys/class/net/
            target: container #(1)!
            phase: on-enter #(2)!
```

1. `target` defaults to "container" and can be omitted. Possible values `container` or `host`
2. `phase` defaults to "on-enter" and can be omitted. Possible values `on-enter` or `on-exit`


Note, this is a breaking change if you used execs in the stages before.

## Miscellaneous

- fixed loading custom export templates #2240
- iptables kernel load to support compressed modules #2251
- fixed the release retrieval routine #2250
- Cisco IOL to support custom PIDs and randomized MACs #2239
- SR Linux kind drops support for mounted authz_keys file #2254
