Ansible on AIX

Has anybody used ansible on AIX?

Searching the mailing list for "aix" turns up a bunch of hits. Looks
like there is AIX support built into various key modules as well.

We found we needed to mold AIX to accept a few things that should be there anyway:

link /bin/md5sum with /bin/csum for instance. or the copy module won’t work
Adding users works, but not with HACMP.

find at least python 2.6 and update sudo.

We are trying to get rid of this archaic remnant of UNIX though. The world is moving on, and there’s just too little support for AIX out there.

Mark

This would be easy to add to the current remote_md5 function. Just one
question, how does csum act when the target is a directory?

hmm, seems someone added with an alternative path:

“(/usr/bin/csum -h MD5 %s 2>/dev/null)” % path # AIX

The md5sum logic is a bit “fancy”. BTW, it’s been suggested that we can have a setup module fact that returns the md5’r to use, and if set, bypass this logic for future calls.

I don’t think it really saves a lot, but would make -vvv output at least cleaner.

I was fixing it for a BSD corner case so I went ahead and added a 2nd path for AIX

https://github.com/ansible/ansible/pull/5993

Merged in and now available on the devel branch, thanks!

Yes…

I have a bunch of basic configuration tasks that I have running on Linux and AIX. I have found a few (minor) issues so far…

  1. Unpack requires gnu tar if you give it a compressed tar file, simple solution, give it uncompressed ones. :smiley:

  2. Python can cause issues (I’ve had to compile my own python for AIX 7x because the OpenSSL library has gone from 0.9.9 to 1.0.1… Python runs and then fails with strange error messages at times).

  3. The cron module requires a minor change to work with AIX (pull request is in so hopefully it will make it into the code soon.

That’s most of the things I can remember for now.

Adam

Of course I post and then realise that I missed a big one… The password format is different between AIX and Linux. I got round this by using jinja2 to convert the format for me…

  • name: add accounts for AIX
    user: name={{item.name}} append=yes createhome=yes group=group
    shell={{osshell}} uid={{item.uid}} comment={{item.comment}}
    state={{item.state}} update_password=on_create
    password={{item.password | replace(“$1$”, “{smd5}”, 1)| replace(“$5$”, “{ssha256}”, 1) | replace(“$6$”, “{ssha512}”, 1) }}
    with_items: localuserlist
    when: ansible_os_family == “AIX”

I realise that may not be the best way of doing this but it works well. Most of the other differences that I have found so far are things that I can work around by using variables.

Adam

We found we needed to mold AIX to accept a few things that should be there anyway:

link /bin/md5sum with /bin/csum for instance. or the copy module won’t work

We had issues with md5 but in our case it was because python had been compiled with a different openSSL library… (The AIX 6 Python partially works on AIX 7, but not well enough…)

Adding users works, but not with HACMP.

Not something I’ve tried yet, presumably there are potential issues around account synchronisation there.

find at least python 2.6 and update sudo.

Make sure that your python version works properly with your AIX version. Which in the case of AIX 7.1 means you probably have to compile it yourself. Up to date, pre-compiled FOSS is not so easy to find for AIX so being able to compile your own is too common. If you are compiling anyway then you might as well go for a newer version.

We are trying to get rid of this archaic remnant of UNIX though. The world is moving on, and there’s just too little support for AIX out there.

You obviously don’t work in the same industry I do… :slight_smile:

Adam