SQL query to get all foreman nodes as a rundeck resource-json
This is a simple SQL query to get from foreman postgresql database all the nodes and format them in json resource as rundeck can use it.
I did this to replace foreman_host_rundeck plugin.
You can find an example bash script to use this query to import foreman nodes in rundeck : example_rundeck_script.bash
.
Test with foreman 3.0.0, postgresql 12.7, and rundeck 3.4.2.