rundeck-plugins / ansible-plugin

Ansible Integration for Rundeck
MIT License
331 stars 100 forks source link

added ability to import ansible_port if set on the inventory file #281

Open numiralofe opened 4 years ago

numiralofe commented 4 years ago

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.

CorvetteCole commented 2 years ago

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

huapox commented 11 months ago

+1