template module on top of symlink always returns "changed"

Hello

My playbook contains:

`

  • name: configure mysql
    template: src=my.cnf.j2 dest=/etc/mysql/my.cnf
    notify:
  • restart mysql
    `

In ubuntu 14 /etc/mysql/my.cnf is an actual file.
In ubuntu 16 /etc/mysql/my.cnf is a symlink to /etc/alternatives/my.cnf.

When it’s a symlink, the template module always outputs a “changed”, even if the actual contents are exactly the same, thus mysql is always restarted.

Is there a way to configure template in a way to not return “changed” when the actual target is behind a symlink?

thanks