Skip to content
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

Ability to specify multiple resources to run instead of a category #51

Closed
anshumanbh opened this issue Oct 19, 2017 · 2 comments
Closed

Comments

@anshumanbh
Copy link

Hi,

This is more of a feature request. Right now, if we want to run multiple YMLs for, lets say, a particular resource Apache Tomcat - apache_tomcat_manager.yml (Name - Apache Tomcat Manager) and apache_tomcat_host_manager.yml (Name - Apache Tomcat Host Manager), there is no easy way to do it. I am having to mention -c web so that it automatically runs both of them along with all others.

Can we modify the flag -n to take in multiple names instead of just one?
How easy/difficult would this be? I can try issuing a PR if you can direct me exactly where I need to change this in the code.

Cheers!

@ztgrace
Copy link
Owner

ztgrace commented Oct 20, 2017

Right now the code that matches a cred to the --name option is at https://github.com/ztgrace/changeme/blob/master/changeme/core.py#L334. For your example, you can use -n "Apache Tomcat" or simply -n Tomcat and it would match both.

If this were to be implemented the format should be similar to the --protocols format of comma separated strings: --name "Apache Tomcat","jboss" Then you could use split(',') to parse the multiple names.

Feel free to give it a shot and make a pull request to the development branch.

Thanks,
Zach

@anshumanbh
Copy link
Author

Okay, I didn't know that giving -n Tomcat will pick both up. That's good for specific matching resources however for completely different resources, I guess it won't work. So, I will try to work on this asap I can. Thanks for the reply :)

ztgrace added a commit that referenced this issue Oct 21, 2017
@ztgrace ztgrace closed this as completed Oct 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants