-
-
Notifications
You must be signed in to change notification settings - Fork 450
Description
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.