Ansible 1.9.2 has been released

Hi all, Ansible 1.9.2 final has been released and is now available.

Ansible 1.9.2 addresses two security bugs, so we recommend users update as soon as possible:

  • Security fixes to check that hostnames match certificates with https urls (CVE-2015-3908)
  • get_url and uri modules
  • url and etcd lookup plugins
  • Security fixes to the zone (Solaris containers), jail (bsd containers),
    and chroot connection plugins. These plugins can be used to connect to
    their respective container types in leiu of the standard ssh connection.
    Prior to this fix being applied these connection plugins didn’t properly
    handle symlinks within the containers which could lead to files intended to
    be written to or read from the container being written to or read from the
    host system instead. (CVE pending)

Beyond these two fixes, the following bugs are addressed:

  • Fixed a bug in the service module where init scripts were being incorrectly used instead of upstart/systemd.
  • Fixed a bug where sudo/su settings were not inherited from ansible.cfg correctly.
  • Fixed a bug in the rds module where a traceback may occur due to an unbound variable.
  • Fixed a bug where certain remote file systems where the SELinux context was not being properly set.
  • Re-enabled several windows modules which had been partially merged (via action plugins):
  • win_copy.ps1
  • win_copy.py
  • win_file.ps1
  • win_file.py
  • win_template.py
  • Fix bug using with_sequence and a count that is zero. Also allows counting backwards isntead of forwards
  • Fix get_url module bug preventing use of custom ports with https urls
  • Fix bug disabling repositories in the yum module.
  • Fix giving yum module a url to install a package from on RHEL/CENTOS5
  • Fix bug in dnf module preventing it from working when yum-utils was not already installed

As always, this update is available via PyPi and releases.ansible.com now, and packages for distros will be available as soon as possible.

Thanks, and enjoy!

James Cammarata
Director, Ansible Core Engineering
github: jimi-c

I’ve been struggling with the python path since I’ve started with ansible some weeks ago (which is when I started with python). I’ve had to explicitly set PYTHONPATH, but I’ve never really understood if I should be doing so.

I’ve just updated to ansible 1.9.2 (been using 1.9.2-rc2). But pretty much nothing works now. I get errors due to system modules not found. Eg,

`
NameError: global name ‘urllib’ is not defined

`

I’ve had these kinds of errors on both my mac laptop and ubuntu desktop.

I’ve tried with both no PYTHONPATH set and also with PYTHONPATH=/usr/local/lib/python2.7/site-packages – same error.

I upgraded on OSX using (without the flags the install failed):

`
sudo CFLAGS=-Qunused-arguments CPPFLAGS=-Qunused-arguments pip install --upgrade ansible

`

I’ve followed the install docs correctly (I think). Should expect these problems? Is python dependencies/install a pain like ruby?

I see this issue which seems to be my problem, but no real info there: https://github.com/ansible/ansible/issues/11322

So maybe this has nothing to do with 1.9.2 directly. I have gone back to running against source with 1.9.2-rc2 and still have this problem. So its just that the upgrade broke my python environment somehow. Searching and searching but not finding any leads.

Barry,

normally a straight pip install is all you need, it should 'just work'
TM. It seems that your environment is messed up at this point so I
would suggest that you pip uninstall ansible and start fresh with a
1.9.2 install.

The ticket you reference had a coding error that caused an import
error, which is the same message you got but different cause, in your
case it seems to be the setup.

Hmm, well, a module that I have been using (copied in my ./modules) depends urllib but not does not import it. I added the import and my error is now gone. So it had nothing at all to do with python or ansible. No idea why this was working before.