Ansible hosts with non-standard ssh port
Hi there,
I'm trying to setup rundeck with ansible and so far I have been partially successful. The ansible hosts are correctly all detected and imported as nodes, however the hosts which are not using the standard port 22 for ssh have their port missing and I cannot see any option for specifying this.
I have tried setting the "extra ansible arguements" with "-e ansible_port=999", but this results in the job failing with the error "ERROR! the playbook: ansible_port=999 could not be found 23:08:23 Failed: AnsibleNonZero: ERROR: Ansible execution returned with non zero code."
Any help would be much appreciated.
I forgot to mention that within the ansible host file the server is defined as servername:port
https://docs.rundeck.com/docs/administration/projects/node-execution/ssh.html
I'm trying to figure this out now.
It looks like rundeck's ansible node plugin is not importing the ssh port.
any news about this topic. If I define the port as mention in docs it cannot resolve the hostname.
running currently in the same issue... Since in my case it´s only one node I could add it to a Rundeck Node File but ofc this is not the nice way.
I am running into the same problem. I am currently evaluating ansible+rundeck (to replace awx) for our company. However, all our servers are running ssh on the (same) non-standard port. So currently it looks to me as if the evaluation just failed... Unless there is any news on this topic?
I see there is an open pull request in this direction: https://github.com/Batix/rundeck-ansible-plugin/pull/281 That would at least be a functional workaround.
What would be really ideal though, would be just honoring the setting from ansible.cfg, which is read in after all:
[ssh_connection] remote_port = an_integer
It seems pretty weird to me that rundeck itself doesn't have a setting for the standard ssh setting, just allowing overriding per host (which isn't discovered yet, so not an option), but that is of course outside of the scope of this plugin.
Workaround found, for our usecase of that ssh port being the same for all servers: echo " Port an_integer" >> /etc/ssh/ssh_config
This doesn't help if any servers had a different ssh port, so this issue still deserves to stay open. But at least for our use case, this is good enough. :-)
any update on this issue?
I can confirm, that this issue still exists, have one server in wan, which has non default ssh-port and:
ansible -m shell -a id myhost
works, but adhoc id comand fails in rundeck.
Would be great to have this issue get fixed one time