Skip to content

Possibility to force execution of operation #653

@giuppep

Description

@giuppep

Is your feature request related to a problem? Please describe

Pyinfra collects all facts before running operations. However sometimes an operation could modify this state during execution and as far as I could understand, there is no way to force pyinfra execute an operation.

Example:
At the end of a deploy script we want to make sure that some directory X is owned by a given user:group. In the script there is a command that could change the owner of X. Since pyinfra evaluates all the facts before starting the deployment, if the ownership was correctly set before the current deployment started (e.g. by a previous successful deployment), then the files.directory("X", user="user", group="group") will not be executed at the end of the script.

Describe the solution you'd like

A flag to make pyinfra execute an operation regardless of whether the relevant facts determined it could be skipped.

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