-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add per-host capability to shell plugin #24
base: develop
Are you sure you want to change the base?
Add per-host capability to shell plugin #24
Conversation
Currently, any configured script will execute on all hosts. This commit will allow for a host item in the config so that the script will only run on the specific host. A hostname of "-" will match all hosts. For backwards compatibility, a config with no host specified will run on all hosts.
…ley/snowsaw into feature/shell-per-host-config
Sorry for the long delay, haven't got the time to test and review the changes yet, but I'll definitely check it until next weekend. ⌚ |
Too funny, I was literally just thinking about this. I got this notification about 10 seconds after I cd'd into my snowblocks directory to add something. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should change the implementation to match the hosts
option of the link
plugin added in #22.
A single host
string would limit the command to a single host. If users like to run the command on more than one specific host they need to add the same command multiple times with a different host
string.
It should be fine to have duplicated code in the link
and shell
core plugins for the moment since I thought about making the hosts
option part of the base Plugin
class to make it available for every plugin.
Let me know what you think about this change.
Currently, any configured script will execute on all hosts. This commit
will allow for a host item in the config so that the script will only
run on the specific host. A hostname of "-" will match all hosts. For
backwards compatibility, a config with no host specified will run
on all hosts.