You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just wondering if I'm missing something with files.put(). I would have expected the ability to set set present=False like files.file(). I can do a conditional:
# Add the APT preferencesfiles.put(
name='Set APT preferences for repo',
src=apt_prefs,
dest=f'/etc/apt/preferences.d/{repo_ident}',
_if=bool(apt_prefs),
)
But that still leaves an existing file present on the remote if bool(apt_refs) turns False.
Being able to present=bool(apt_prefs) would ensure the file is or is not present. As it currently stands, it looks like I need to combine .put() and .file() to get this functionality?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Just wondering if I'm missing something with
files.put()
. I would have expected the ability to set setpresent=False
likefiles.file()
. I can do a conditional:But that still leaves an existing file present on the remote if
bool(apt_refs)
turns False.Being able to
present=bool(apt_prefs)
would ensure the file is or is not present. As it currently stands, it looks like I need to combine.put()
and.file()
to get this functionality?Thanks.
Beta Was this translation helpful? Give feedback.
All reactions