I would likely modify your example do something like this:
- name: Install mysql server
apt: pkg=mysql-server state=installed
register: $installed_mss
- name: Remove mysql config file
file: path=/etc/mysql/my.cnf state=absent
when_changed: $installed_mss
- name: Symlink mysql conf
file: src=/srv/degen/misc/deploy/my.cnf
dest=/etc/mysql/my.cnf state=link
notify: Restart mysql
when_changed: $installed_mss
The reason we don't have file forcing between link and file states (or
file and link) for the most part is that could mean too many different
things about how to resolve that particular confusion, and I'd prefer
if things be explicit.
If done with changed variables (above), it still only runs when needed
and that should be fine.
> --
> 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.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>
--
Michael DeHaan <
mic...@ansibleworks.com>
CTO, AnsibleWorks, Inc.
http://www.ansibleworks.com/