title: replacing a file with a symbolic link in a salt state
body: <p>I'm new to salt-stack.</p>
  
  <p>I'm trying to make sure a symbolic link exists.</p>
  
  <pre><code>/etc/localtime:
    file.symlink:
      - target: /usr/share/zoneinfo/Europe/Paris
      - file.exists:
        - name: /usr/share/zoneinfo/Europe/Paris
  </code></pre>
  
  <p>The result is as excepted when there's no existing <code>/etc/localtime</code>, or when <code>/etc/localtime</code> is already a symlink. But it fails when <code>/etc/localtime</code> is a regular file :</p>
  
  <pre><code>----------
  State: - file
  Name:      /etc/localtime
  Function:  symlink
      Result:    False
      Comment:   File exists where the symlink /etc/localtime should be
      Changes:   
  </code></pre>
  
  <p>I can't figure how to code the state so the file is deleted before the link creation. Any clue ?</p>
  
  <p>Cheers,
  Pierre</p>