Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions management/autorun/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
# Enable autorun
This module enables autorun functionality so you can add policy files to `services/autorun` and tag bundles with `autorun` causing them to be automatically discovered and run.

Simple module to enable autorun functionality, using def.json.
A policy file you add to `services/autorun` could look like this:

```cfengine3
bundle agent my_example
{
meta:
"tags"
slist => { "autorun" };
reports:
"Hello, world!"
}
```

With autorun enabled, the policy file would be parsed, and the bundle evaluated without editing any of your existing files / policy.

It uses the augments file to achieve this, it is the same as editing your `def.json` file like this:

```json
{
"classes": {
"services_autorun": ["any"]
}
}
```