I have a strange problem with Ansible that I use to install / update / manage my webservers.
I have an installation script that is supposed to make sure that I always have the latest PHP5 module in my Debian 6 / Apache 2 system:
- name: install apache2 and php5
action: apt pkg=$item state=latest
with_items:
- apache2
- php5
- libapache2-mod-php5
- php5-curl
[...]
notify:
- restart apache
It usually works great, but once every few runs I end up with mod-php5-filter in my apache instead of mod-php5 - which is bad for various reasons (mainly for breaking everything).
All I have to do then is run my installation script again - and I'm back to mod-php5
Any ideas? Anything that I might be doing wrong?
I'd suggest that it's being dragged in as a dependency for php5.
If it thought libapache2-mod-php5 was unavailable at the time of apt pkg=php5 then it would get the next in the list of dependencies for libapache2-mod-php5filter. Does it happen less if you swap the order of your
with_items:
?