community.aws.iam_user_info:

14 views
Skip to first unread message

esxi...@gmail.com

unread,
Nov 8, 2020, 11:30:17 PM11/8/20
to Ansible Project
Hi,

How can i do a debug & see all users  ? Any suggestions Please ?



# Note: These examples do not set authentication details, see the AWS Guide for details. # Gather facts about "test" user. - name: Get IAM user facts community.aws.iam_user_info: name: "test"

==
i tried
---
  - name: User info
    hosts: local
    connection: local

    tasks:
      - name: gather user info
        community.aws.iam_user_info:
          name: "admin"
        register: result
==

i would like to get all user info not user  called admin only...


Thanks


esxi...@gmail.com

unread,
Nov 9, 2020, 11:01:25 AM11/9/20
to Ansible Project
found it

---
  - name: User info
    hosts: local
    connection: local

    tasks:
      - name: gather user info
        community.aws.iam_user_info:
          name: "admin"
        register: result
      - name: User info
        ansible.builtin.debug:
          msg: "{{ result['iam_users'] }}"

Reply all
Reply to author
Forward
0 new messages