purpleidea / mgmt

Next generation distributed, event-driven, parallel config management!
https://purpleidea.com/tags/mgmtconfig/
GNU General Public License v3.0
3.67k stars 315 forks source link

automatic edge between http:file and file #734

Open purpleidea opened 9 months ago

purpleidea commented 9 months ago

Automatic edges add dependencies between different resources.

For example:

$f2 = "/tmp/some_file"
file $f2 {
        content => "i'm a cool file in /tmp\n",
        state => $const.res.file.state.exists,
}

http:server ":8080" {
}

http:file "/file2" {
        path => $f2,

        Depend => File[$f2],    # TODO: add autoedges
}

We have an API to add these automatically. Add this feature for these two resources! Keep in mind that path can be a dir as well. The examples/lang/http*.mcl examples should make this all easier to test.