-
Notifications
You must be signed in to change notification settings - Fork 219
Description
We need to split remote execution commands (functions that doesn't describe a state [ex.: is_file(), free(), ...]) and configuration management commands (functions that describe a state [ex.: file(), service(), pkg(), ...]) into different namespaces.
- Execution functions: Rex::Commands::*
- Config-Management functions: Rex::Resource::*
This has the advantage that it is clear which functions are idempotent and which are not. And we can define meta parameters like on_change, subscribe_to, only_if, ... to all resources.
This step need special attention, because we have to maintain backward compatibility.
Since 0.53 there is a new function calles resource(). With this function it is possible to create new resources. All the resources that are created with this function will have the mentioned meta parameters and can trigger events like "created", "changed" or "removed".
All the resources (rex basic ones, and custom ones) will be also visible in the reporting. And example resource can be found here: http://bit.ly/ZoGe5N)