Hello,
I knoww is possible execute a action only if some file don't not
exist using creates param, eg:
- name: activate apache2 modules
action: command /usr/sbin/a2enmod $item
creates=/etc/apache2/mods-enabled/$item.load
with_items:
- actions
- fastcgi
- alias
is also possibile execcute action only if file exist?
Eg:
- name: disable apache2 default websites
action: command /usr/sbin/a2dissite $item
remove=/etc/apache2/sites-enabled/$item
with_items:
- default
- default-ssl
And the task will be execute only if file
/etc/apache2/sites-enabled/$item exist.
If is not possibile i think will be a nice feature fo ansible 0.8
Bye
Marco