# Ansible on AIX

**URL:** <https://forum.ansible.com/t/ansible-on-aix/14553>\
**Category:** Ansible Project\
**Created:** [February 12, 2014, 6:49pm UTC](https://forum.ansible.com/t/ansible-on-aix/14553 "2014-02-12T18:49:44Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill\_King](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@Bill\_King](https://forum.ansible.com/u/Bill_King)\
**Post date:** [February 12, 2014, 6:49pm UTC](https://forum.ansible.com/t/ansible-on-aix/14553/1 "2014-02-12T18:49:44Z")

</div>

Has anybody used ansible on AIX?

---

<div class="post-metadata">

**Author:** ![Romeo\_Theriault](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@Romeo\_Theriault](https://forum.ansible.com/u/Romeo_Theriault)\
**Post date:** [February 13, 2014, 1:06am UTC](https://forum.ansible.com/t/ansible-on-aix/14553/2 "2014-02-13T01:06:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Mark\_Maas](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@Mark\_Maas](https://forum.ansible.com/u/Mark_Maas)\
**Post date:** [February 13, 2014, 6:37am UTC](https://forum.ansible.com/t/ansible-on-aix/14553/3 "2014-02-13T06:37:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [February 13, 2014, 1:04pm UTC](https://forum.ansible.com/t/ansible-on-aix/14553/4 "2014-02-13T13:04:51Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [February 13, 2014, 1:06pm UTC](https://forum.ansible.com/t/ansible-on-aix/14553/5 "2014-02-13T13:06:35Z")

</div>

hmm, seems someone added with an alternative path:

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

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [February 13, 2014, 1:27pm UTC](https://forum.ansible.com/t/ansible-on-aix/14553/6 "2014-02-13T13:27:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [February 13, 2014, 1:31pm UTC](https://forum.ansible.com/t/ansible-on-aix/14553/7 "2014-02-13T13:31:14Z")

</div>

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](https://github.com/ansible/ansible/pull/5993)

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [February 13, 2014, 1:38pm UTC](https://forum.ansible.com/t/ansible-on-aix/14553/8 "2014-02-13T13:38:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Adam\_Morris](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Adam\_Morris](https://forum.ansible.com/u/Adam_Morris)\
**Post date:** [February 13, 2014, 11:15pm UTC](https://forum.ansible.com/t/ansible-on-aix/14553/9 "2014-02-13T23:15:04Z")

</div>

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. 😃

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

---

<div class="post-metadata">

**Author:** ![Adam\_Morris](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Adam\_Morris](https://forum.ansible.com/u/Adam_Morris)\
**Post date:** [February 13, 2014, 11:28pm UTC](https://forum.ansible.com/t/ansible-on-aix/14553/10 "2014-02-13T23:28:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Adam\_Morris](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Adam\_Morris](https://forum.ansible.com/u/Adam_Morris)\
**Post date:** [February 13, 2014, 11:49pm UTC](https://forum.ansible.com/t/ansible-on-aix/14553/11 "2014-02-13T23:49:46Z")

</div>

> 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
