Skip to content

Commit e603b58

Browse files
authored
Merge pull request #109 from olehermanse/autorun
Improved the README for the autorun module
2 parents bf3b21d + 1d721a6 commit e603b58

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

management/autorun/README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1-
# Enable autorun
1+
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.
22

3-
Simple module to enable autorun functionality, using def.json.
3+
A policy file you add to `services/autorun` could look like this:
4+
5+
```cfengine3
6+
bundle agent my_example
7+
{
8+
meta:
9+
"tags"
10+
slist => { "autorun" };
11+
reports:
12+
"Hello, world!"
13+
}
14+
```
15+
16+
With autorun enabled, the policy file would be parsed, and the bundle evaluated without editing any of your existing files / policy.
17+
18+
It uses the augments file to achieve this, it is the same as editing your `def.json` file like this:
19+
20+
```json
21+
{
22+
"classes": {
23+
"services_autorun": ["any"]
24+
}
25+
}
26+
```

0 commit comments

Comments
 (0)