A (probably dumb) question and some kudos.

Greetings,

This time I will hopefully not hit the wrong key and post my message before actually entering the body of it. (Sorry about that).

First the Kudos…

I’ve been playing with Ansible for the last few months getting it to do some base server configuration for me, and I am truly impressed with how well it works on Linux.

Earlier this week I sat down and tested the same configuration bits on an AIX server and was even more impressed. There were a few (minor) gotchas where I had to go in and add some OS specific variables into my playbooks but for the most part it generally just worked.
As a result I had the same base configuration steps working for AIX within a day. A few differences exist, the biggest is that for Linux I am only performing a minimal OS install and the Ansible playbook pulls in all of the software packages that I need. For AIX there is no Ansible package management option so I am assuming that my install will have to include everything that I need (not a big deal). The one portion that didn’t just work is the System Cron module. crontab on AIX has a different syntax from Linux and Solaris. I’ve modified the module to work for AIX and will be testing it in the next few days and submitting a pull request as soon as I am happy that it works.

And now my (probably dumb) question…

When I was using Ansible with an AIX host I discovered that I had to change a parameter in the configuration file to get it to work. When I went back to a clean Linux build I had to explicitly take the same option back out.
The option in question is “scp_if_ssh = True” Without that I couldn’t get the AIX host to talk to me… with it I couldn’t get the minimal RedHat host to talk to me. Is there any way that I can set that behaviour based on OS or do I need to develop a smart SSH copy option that uses one and falls back to the other if it doesn’t work?

Thanks,

Adam

I’m fine with making the “scp_if_ssh” controllable via a per-group or per-host inventory variable, such as “ansible_scp_if_ssh” as we have with control over SSH ports, sudo users, and other things.

That probably seems best in your case.

I would suggest to either open a github ticket for the feature idea (or … strongly strongly preferred if you’re wanting this soon) submit a pull request that adds it.

I don’t think we would want to have retry logic present as it would be, if anything, a bit slower, when we knew we wanted one or the other, and also maybe a bit error prone in the detection.

–Michael

I’ll work on the pull request. It will take me longer than putting in a github ticket as I don’t know the internals of Ansible well enough (yet). But it looks like the changes will be limited to three or four files…

Thanks for the suggestion,

Adam

I discovered that the issue is not as clear cut as AIX is one way Linux is another, so I’m trying to work out why some AIX hosts use sftp while others don’t… It might be easier (and better) to fix the issue than try and force Ansible to work around our shortcomings.

Adam

Check the subsystem entry in sshd_config in the targets, another thing too look at is the openssh version

Brian Coca