Skip to content

Commit

Permalink
docs: document any_changed, all_changed
Browse files Browse the repository at this point in the history
  • Loading branch information
bauen1 committed Oct 17, 2024
1 parent 1294ecd commit 94e78cf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/using-operations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ All operations return an operation meta object which provides information about
_if=lambda: create_user.did_change() or create_otheruser.did_change(),
)
# The functions `any_changed` and `all_changed` are provided for common use cases, e.g.
from pyinfra.operations.utils import any_changed, all_changed
server.shell(commands=["..."], _if=any_changed(create_user, create_otheruser))
server.shell(commands=["..."], _if=all_changed(create_user, create_otheruser))
Operation Output
~~~~~~~~~~~~~~~~

Expand Down

0 comments on commit 94e78cf

Please sign in to comment.