{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/13159","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/13159/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/13159/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/13159/events","html_url":"https://github.com/ansible/ansible/issues/13159","id":116795336,"number":13159,"title":"File mode gives unpredictable results","user":{"login":"nydr","id":10299338,"avatar_url":"https://avatars.githubusercontent.com/u/10299338?v=3","gravatar_id":"","url":"https://api.github.com/users/nydr","html_url":"https://github.com/nydr","followers_url":"https://api.github.com/users/nydr/followers","following_url":"https://api.github.com/users/nydr/following{/other_user}","gists_url":"https://api.github.com/users/nydr/gists{/gist_id}","starred_url":"https://api.github.com/users/nydr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nydr/subscriptions","organizations_url":"https://api.github.com/users/nydr/orgs","repos_url":"https://api.github.com/users/nydr/repos","events_url":"https://api.github.com/users/nydr/events{/privacy}","received_events_url":"https://api.github.com/users/nydr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-13T15:52:55Z","updated_at":"2016-02-12T12:34:45Z","closed_at":"2015-11-13T17:51:03Z","body":"When using the yaml syntax for modules \"mode\" gives weird results unless they are quoted, this opens up for unpredictable errors so it should either give a warning or work the same way no matter if it's quoted or not.\r\n```\r\n- file:\r\n    path: /tmp/t1\r\n    state: directory\r\n    mode: 2775\r\ngives unexpected result:\r\nd-ws-w-rwt   2 root root 4.0K Nov 13 14:59 t1\r\n```\r\n```\r\n- file: > \r\n    path=/tmp/t2\r\n    state=directory\r\n    mode=2775\r\ngives result:\r\ndrwxrwsr-x   2 root root 4.0K Nov 13 14:59 t2\r\n```\r\n```\r\n- file:\r\n    path: /tmp/t3\r\n    state: directory\r\n    mode: \"2775\"\r\ngives result:\r\ndrwxrwsr-x   2 root root 4.0K Nov 13 14:59 t3\r\n```\r\nTested on ansible 1.9.4 and 2.0.0 (devel b2a9111b22)\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/183305212","html_url":"https://github.com/ansible/ansible/issues/13159#issuecomment-183305212","issue_url":"https://api.github.com/repos/ansible/ansible/issues/13159","id":183305212,"user":{"login":"aleemb","id":46616,"avatar_url":"https://avatars.githubusercontent.com/u/46616?v=3","gravatar_id":"","url":"https://api.github.com/users/aleemb","html_url":"https://github.com/aleemb","followers_url":"https://api.github.com/users/aleemb/followers","following_url":"https://api.github.com/users/aleemb/following{/other_user}","gists_url":"https://api.github.com/users/aleemb/gists{/gist_id}","starred_url":"https://api.github.com/users/aleemb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleemb/subscriptions","organizations_url":"https://api.github.com/users/aleemb/orgs","repos_url":"https://api.github.com/users/aleemb/repos","events_url":"https://api.github.com/users/aleemb/events{/privacy}","received_events_url":"https://api.github.com/users/aleemb/received_events","type":"User","site_admin":false},"created_at":"2016-02-12T12:34:45Z","updated_at":"2016-02-12T12:34:45Z","body":"@jimi-c \r\n\r\nThis tripped me up too and it's sure to trip up others as well.\r\n\r\nYou think it would be more user-friendly to allow `mode: 2775` to work as expected?\r\n"}}