Open nathanielc opened 9 years ago
OK so I changed this up a bit. The original params are from the 'Parameters' that foreman adds to hosts not query_params. Since my use case needs to change which tags and user are returned based on caller I just added the option to have query_params override any Foreman parameters.
@nvcook42 rundeck=true
doesn't need to be passed to the url anymore, if you use the plugin once you use format=yaml
it will use rundeck.
Can you please add a test? if that's a problem send me an example of the output you expected to get with the example you wrote and I'll add it
Not sure if this is the best solution to the problem but it does work (I am not a ruby rails guy).
Basically the
rundeckuser
andrundeckfacts
parameters didn't work because the params field was not the url parameters, but something else not sure what. Passing the url param variable into the formatter fixes the issues.If this patch is completely off base please point me in the right direction.
I am invoking this plugin like so:
curl -k -u "user:$pass" -X GET 'https://foreman/hosts/?rundeck=true&format=yaml&rundeckuser=jim&rundeckfacts=domain'
And getting output like: