ansible/ansible — pull request #8020 by msabramo (2014-07-02 20:27:46+00:00)
Title: Error if private_key_file is group/world readable

Currently, if you specify an SSH private key that is group or world readable, then ansible fails with a generic error and suggests running again with `-vvvv`. This isn't bad but pinpointing the specific problem immediately is even more user-friendly.

```
$ ls -l devops.pem
-rw-r--r--+ 1 marca staff 1679 Jul 2 11:25 devops.pem

$ ansible -m ping --private-key=devops.pem mt3-pyweb01
mt3-pyweb01 | FAILED => private_key_file (devops.pem) is group-readable or world-readable and thus insecure - you will probably get an SSH failure
```

Cc: @sontek, @aconrad