ansible-plugin icon indicating copy to clipboard operation
ansible-plugin copied to clipboard

added ability to import ansible_port if set on the inventory file

Open numiralofe opened this issue 4 years ago • 2 comments

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.

numiralofe avatar Aug 24 '20 17:08 numiralofe

would love for support of this to be merged, now that rundeck itself maintains this. Have a few workflows that require it

CorvetteCole avatar May 11 '22 13:05 CorvetteCole