Ansible on AIX

1,951 views
Skip to first unread message

Bill King

unread,
Feb 12, 2014, 1:49:44 PM2/12/14
to ansible...@googlegroups.com
Has anybody used ansible on AIX?

Romeo Theriault

unread,
Feb 12, 2014, 8:06:00 PM2/12/14
to ansible...@googlegroups.com
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.

On Wed, Feb 12, 2014 at 8:49 AM, Bill King <wjki...@gmail.com> wrote:
> Has anybody used ansible on AIX?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



--
Romeo

Mark Maas

unread,
Feb 13, 2014, 1:37:30 AM2/13/14
to ansible...@googlegroups.com
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

Brian Coca

unread,
Feb 13, 2014, 8:04:51 AM2/13/14
to ansible...@googlegroups.com

On Thu, Feb 13, 2014 at 1:37 AM, Mark Maas <ma...@maas-martin.nl> wrote:
/bin/csum

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?


--
Brian Coca
Stultorum infinitus est numerus
0110000101110010011001010110111000100111011101000010000001111001011011110111010100100000011100110110110101100001011100100111010000100001
Pedo mellon a minno

Brian Coca

unread,
Feb 13, 2014, 8:06:35 AM2/13/14
to ansible...@googlegroups.com
hmm, seems someone added with an alternative path:

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

Michael DeHaan

unread,
Feb 13, 2014, 8:27:18 AM2/13/14
to ansible...@googlegroups.com
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.


On Thu, Feb 13, 2014 at 8:06 AM, Brian Coca <bria...@gmail.com> wrote:
hmm, seems someone added with an alternative path:

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

Brian Coca

unread,
Feb 13, 2014, 8:31:14 AM2/13/14
to ansible...@googlegroups.com
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

Michael DeHaan

unread,
Feb 13, 2014, 8:38:49 AM2/13/14
to ansible...@googlegroups.com
Merged in and now available on the devel branch, thanks!


On Thu, Feb 13, 2014 at 8:31 AM, Brian Coca <bria...@gmail.com> wrote:
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

--

Adam Morris

unread,
Feb 13, 2014, 6:15:04 PM2/13/14
to ansible...@googlegroups.com
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.  :-D

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

Adam Morris

unread,
Feb 13, 2014, 6:28:40 PM2/13/14
to ansible...@googlegroups.com
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

Adam Morris

unread,
Feb 13, 2014, 6:49:46 PM2/13/14
to ansible...@googlegroups.com


On Wednesday, February 12, 2014 10:37:30 PM UTC-8, Mark Maas wrote:
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... :-)

Adam


Reply all
Reply to author
Forward
0 new messages