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
- name: Install some CLIbecome: trueansible.builtin.unarchive:
src: "https://someurl.com/filename.tar.gz"dest: /usr/local/bin/mode: "0755"
which failed because remote_src: true was missing, so the code looked for a file named as the url on the local filesystem.
I think that if src is a url, it's very likely the author actually wants to fetch a remote file, and the linter could raise a warning about it, suggesting to add the missing remote_src attribute. In theory, it could be a filename, but I think using such a filename would be asking for trouble anyway, so not really "best practice".
There are probably a few other commands which use remote_src or something similar that could be checked that way too.
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
-
I just had an error in my playbook with:
which failed because
remote_src: true
was missing, so the code looked for a file named as the url on the local filesystem.I think that if
src
is a url, it's very likely the author actually wants to fetch a remote file, and the linter could raise a warning about it, suggesting to add the missingremote_src
attribute. In theory, it could be a filename, but I think using such a filename would be asking for trouble anyway, so not really "best practice".There are probably a few other commands which use
remote_src
or something similar that could be checked that way too.Beta Was this translation helpful? Give feedback.
All reactions