Browse code

[stable-2.7] Fix STS assume role error message when role does not exist (#63249)

AWS appears to have changed this error message again.
Fixes https://app.shippable.com/github/ansible/ansible/runs/145643/115/tests
(cherry picked from commit ce402f003f)

Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>

Jill R authored on 2019/10/10 06:08:29
Showing 1 changed files
... ...
@@ -290,14 +290,14 @@
290 290
       assert:
291 291
         that:
292 292
           - 'result.failed'
293
-          - "'Access denied' in result.msg"
293
+          - "'is not authorized to perform: sts:AssumeRole' in result.msg"
294 294
       when: result.module_stderr is not defined
295 295
 
296 296
     - name: assert assume not existing sts role
297 297
       assert:
298 298
         that:
299 299
           - 'result.failed'
300
-          - "'Access denied' in result.module_stderr"
300
+          - "'is not authorized to perform: sts:AssumeRole' in result.msg"
301 301
       when: result.module_stderr is defined
302 302
 
303 303
     # ============================================================