From 9180013682ddc7e6d2592d192e866e5c4b84a8c4 Mon Sep 17 00:00:00 2001 From: Ali Asad Lotia Date: Sun, 16 Mar 2014 16:24:04 +0000 Subject: [PATCH 1/2] Fix acl module doc and error messages - Fix typos in module doc - Provide clearer error message when entry and etype are both missing --- library/files/acl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/files/acl b/library/files/acl index 63400b3d61..d15a31e618 100644 --- a/library/files/acl +++ b/library/files/acl @@ -95,7 +95,7 @@ EXAMPLES = ''' - acl: name=/etc/foo.d entity=joe etype=user permissions=rw default=yes state=present # Same as previous but using entry shorthand -- acl: name=/etc/foo.d entrty="default:user:joe:rw-" state=present +- acl: name=/etc/foo.d entry="default:user:joe:rw-" state=present # Obtain the acl for a specific file - acl: name=/etc/foo.conf @@ -218,7 +218,7 @@ def main(): if state in ['present','absent']: if not entry and not etype: - module.fail_json(msg="%s requries to have ither either etype and permissions or entry to be set" % state) + module.fail_json(msg="%s requires either etype and permissions or just entry be set" % state) if entry: if etype or entity or permissions: From 4a006a78b3825038b38522276ce6df2eed4b0643 Mon Sep 17 00:00:00 2001 From: Ali Asad Lotia Date: Sun, 16 Mar 2014 17:49:36 +0000 Subject: [PATCH 2/2] Whitespace fixes in incompatible param check - Remove extra whitespace in conditional that checks if etype, entity or permissions are also set when entry is set. --- library/files/acl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/files/acl b/library/files/acl index d15a31e618..93431ecf47 100644 --- a/library/files/acl +++ b/library/files/acl @@ -221,7 +221,7 @@ def main(): module.fail_json(msg="%s requires either etype and permissions or just entry be set" % state) if entry: - if etype or entity or permissions: + if etype or entity or permissions: module.fail_json(msg="entry and another incompatible field (entity, etype or permissions) are also set") if entry.count(":") not in [2,3]: module.fail_json(msg="Invalid entry: '%s', it requires 3 or 4 sections divided by ':'" % entry)