Skip to content

Change flag re-exported for all tasks #637

@giacomocariello

Description

@giacomocariello

I would be nice if a module could intercept whether another module has changed in its own check phase. For instance, assuming the "changed" value returned an integer:

file.content "hello" {
content = "hello config"
destination = "/etc/hello.conf"
}

task "restart_hello" {
check = "test {{ lookup file.content.hello.changed }} -eq 1"
apply = "systemctl restart hello.service"
}

This example should restart hello service only if /etc/hello.conf is changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions