ansible-plugin
ansible-plugin copied to clipboard
added ability to import ansible_port if set on the inventory file
Hi all,
I have the need when importing hosts from the ansible inventory file to also set custom ssh ports per host, since this feature was not available i made the following changes, my code is perhaps not the best, feel free to propose / change anything if needed.
Introduced changes: When using ansible inventory files with different ssh ports per host defined within the ansible_port option the plugin was not importing that into rundeck, according to rundeck documentation it is expecting the following format:
hostname:port
The proposed change reads, if set, the ansible_port value from the inventory file and change the hostname to defined format, if not set defaults back to port 22.
would love for support of this to be merged, now that rundeck itself maintains this. Have a few workflows that require it