ansible/ansible — pull request #3638 by shirou (2013-07-23 13:24:48+00:00)
Title: fix: if a path is symlink and trying to chmod, OSError Exception will be raised

Create symlink to exists file using file module with force=yes will fail. From the document, it should be work, I think.
the playbook is this,
```
- name: make symlink to exists file
file: src=/bin/ls dest=/tmp/ls-tmp state=link force=yes mode=0644
```
and error:
```
Traceback (most recent call last):
File "/home/shirou/.ansible/tmp/ansible-1374584668.83-164111205615212/file", line 1254, in
main()
File "/home/shirou/.ansible/tmp/ansible-1374584668.83-164111205615212/file", line 316, in main
changed = module.set_mode_if_different(path, file_args['mode'], changed)
File "/home/shirou/.ansible/tmp/ansible-1374584668.83-164111205615212/file", line 732, in set_mode_if_different
raise e
OSError: [Errno 1] Operation not permitted: '/tmp/ls-tmp'
```
with python 2.7.3 and ubuntu 12.10

This Pull request will fix this exception by adding check about islink and the error is Operation not permitted(EPERM).