# Ansible-playbook does not working with dictionary and with\_items loop!

**URL:** <https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511>\
**Category:** Get Help\
**Tags:** ansible\
**Created:** [September 17, 2025, 10:22pm UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511 "2025-09-17T22:22:43Z")\
**Posts on this page:** 17\
**Page:** 2

<div class="post-metadata">

**Author:** ![Gittes](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@Gittes](https://forum.ansible.com/u/Gittes)\
**Post date:** [September 23, 2025, 2:04am UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/21 "2025-09-23T02:04:48Z")

</div>

I filed a bug issue on Ansible GitHub:

> <https://github.com/ansible/ansible/issues/85897>
>
> \### Summary
> 
> I've been working on this for days!
> 
> I have a playbook calling on a… common role and within the role there is a playbook called add\_groups.yml.
> 
> It says the gid of a list of items in a dictionary the gid is undefined!
> 
> I turned on:
> \`\`\`
> debugger: on\_failed
> \`\`\`
> 
> It's running on MacOS with Homebrew and I ran Disk Utility and there's nothing wrong with the disk! I even reinstalled Ansible and all of it's dependencies!
> 
> I've run it on the local machine, another machine and a remote machine over the VPN and it gets the same error!
> 
> I even ran it with a debug module of the dictionary and it still is able to print it out with the dictionary!
> 
> How do I debug it further please?
> 
> I've also posted question it on:
> https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/19
> 
> \### Issue Type
> 
> Bug Report
> 
> \### Component Name
> 
> ansible.builtin.group
> 
> \### Ansible Version
> 
> \`\`\`console
> $ ansible --version
> ansible \[core 2.19.2\]
> config file = /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg
> configured module search path = \['/Users/chris/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'\]
> ansible python module location = /opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible
> ansible collection location = /Users/chris/.ansible/collections:/usr/share/ansible/collections
> executable location = /opt/homebrew/bin/ansible
> python version = 3.13.7 (main, Aug 14 2025, 11:12:11) \[Clang 17.0.0 (clang-1700.0.13.3)\] (/opt/homebrew/Cellar/ansible/12.0.0/libexec/bin/python)
> jinja version = 3.1.6
> pyyaml version = 6.0.2 (with libyaml v0.2.5)
> \`\`\`
> 
> \### Configuration
> 
> \`\`\`console
> \# if using a version older than ansible-core 2.12 you should omit the '-t all'
> $ ansible-config dump --only-changed -t all
> ANSIBLE\_PIPELINING(/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg) = True
> CONFIG\_FILE() = /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg
> DEFAULT\_ROLES\_PATH(/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg) = \['/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles'\]
> DEFAULT\_VAULT\_PASSWORD\_FILE(/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg) = /opt/ChrisWasHere/.secrets/ansible\_vault\_password.txt
> EDITOR(env: EDITOR) = vim
> INTERPRETER\_PYTHON(/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg) = auto\_silent
> 
> GALAXY\_SERVERS:
> 
> 
> CONNECTION:
> ==========
> 
> local:
> \_\_\_\_\_
> pipelining(/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg) = True
> 
> psrp:
> \_\_\_\_
> pipelining(/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg) = True
> 
> ssh:
> \_\_\_
> pipelining(/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg) = True
> 
> winrm:
> \_\_\_\_\_
> pipelining(/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg) = True
> \`\`\`
> 
> \### OS / Environment
> 
> ProductName: macOS
> ProductVersion: 15.4
> BuildVersion: 24E248
> 
> \### Steps to Reproduce
> 
> I turned on:
> \`\`\`
> debugger: on\_failed
> \`\`\`
> 
> roles/common/tasks/add\_groups.yml:
> 
> \`\`\`yaml (paste below)
> \---
> \# file: roles/common/tasks/add\_groups.yml
> \#
> \# Order of operation: rm\_users.yml -\> rm\_groups.yml -\> add\_groups.yml -\>
> \# add\_users.yml -\> set\_homedir\_perms.yml
> 
> \# - name: user management set global groups macOS
> \# tags:
> \# - user\_mgmt
> \# - admin\_accounts
> \# group:
> \# name: "{{ item }}"
> \# gid: "{{ custom\_groups\[item\].gid if custom\_groups\[item\] is defined else global\_groups\[item\].gid | mandatory }}"
> \# state: "{{ global\_groups\[item\].state | default('present') }}"
> \# with\_items: "{{ global\_groups }}"
> \# when:
> \# - (global\_groups\[item\].state|default('present')) == 'present'
> \# - item not in skip\_groups
> 
> \- name: debug global\_groups
> debug:
> var: test\_global\_groups
> 
> \- name: user management set global groups macOS
> tags:
> - user\_mgmt
> - admin\_accounts
> group:
> name: "{{ item.key }}"
> gid: "{{ item.gid }}"
> state: "{{ item.state | default('present') }}"
> loop: "{{ test\_global\_groups | dict2items }}"
> when:
> - (test\_global\_groups\[item\].state|default('present')) == 'present'
> - item not in skip\_groups
> 
> \- name: user managment set local groups macOS
> tags:
> - user\_mgmt
> group:
> name: "{{ item }}"
> gid: "{{ item.gid | mandatory }}"
> state: "{{ item.state | default('present') }}"
> with\_items: "{{ local\_groups }}"
> when: (global\_groups\[item\].state|default('present')) == 'present'
> 
> \- name: user managment set custom groups macOS
> tags:
> - user\_mgmt
> group:
> name: "{{ item }}"
> gid: "{{ custom\_groups\[item\].gid | mandatory }}"
> state: "{{ custom\_groups\[item\].state | default('present') }}"
> with\_items: "{{ custom\_groups.keys() }}"
> when: custom\_groups is defined
> 
> ...
> \# vim:ft=ansible
> \`\`\`
> 
> roles/common/vars/main.yml:
> \`\`\`
> \#SPDX-License-Identifier: MIT-0
> \---
> \# vars file for common
> 
> 001\_vault\_secrets\_file: inventory/{{ deployment\_enviroment }}/group\_files/all/001\_vault\_secrets.yml.gpg
> 
> test\_global\_groups:
> production\_ansible:
> gid: 10001
> staging\_ansible:
> gid: 20001
> grafana:
> gid: 10501
> prometheus:
> gid: 10502
> zookeeper:
> gid: 10503
> rundeck:
> gid: 10504
> nginx:
> gid: 10505
> gnupgserver:
> gid: 10506
> sequoia:
> gid: 10507
> 
> ...
> \# vim:ft=ansible
> \`\`\`
> 
> playbooks/manage\_users\_and\_groups.yml:
> \`\`\`
> \---
> \## Add/remove users and groups defined in 
> 
> - name: All common roles
> hosts: renders
> become: true
> \# var\_files:
> \# - ../vault/{{ environment }}\_variables.yml
> #include\_vars:
> # file: "../vault/{{ environment }}\_variables.yml"
> vars:
> users\_manage: true
> ansible\_become\_flags: --non-interactive
> roles:
> - common
> 
> ...
> \# vim:ft=ansible:
> \`\`\`
> 
> 
> \### Expected Results
> 
> For it to work!
> 
> \### Actual Results
> 
> \`\`\`console
> ansible-playbook --inventory inventory/staging/staging playbooks/manage\_users\_and\_groups.yml --private-key ~/.ssh/staging\_ansible\_id\_ed25519 --user staging\_ansible --limit capsule-v-001-mm037 -vvvvv --skip-tags to\_skip &\> ~/Temporary/ansible-playbook.common\_role.with\_debgger.output.txt
> 
> Output of ansible-playbook.common\_role.with\_debgger.output.txt:
> 
> ansible-playbook \[core 2.19.2\]
> config file = /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg
> configured module search path = \['/Users/chris/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'\]
> ansible python module location = /opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible
> ansible collection location = /Users/chris/.ansible/collections:/usr/share/ansible/collections
> executable location = /opt/homebrew/bin/ansible-playbook
> python version = 3.13.7 (main, Aug 14 2025, 11:12:11) \[Clang 17.0.0 (clang-1700.0.13.3)\] (/opt/homebrew/Cellar/ansible/12.0.0/libexec/bin/python)
> jinja version = 3.1.6
> pyyaml version = 6.0.2 (with libyaml v0.2.5)
> Using /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg as config file
> Reading vault password file: /opt/ChrisWasHere/.secrets/ansible\_vault\_password.txt
> setting up inventory plugins
> Loading collection ansible.builtin from 
> host\_list declined parsing /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/inventory/staging/staging as it did not pass its verify\_file() method
> script declined parsing /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/inventory/staging/staging as it did not pass its verify\_file() method
> auto declined parsing /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/inventory/staging/staging as it did not pass its verify\_file() method
> Parsed /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/inventory/staging/staging inventory source with yaml plugin
> Loading collection community.general from /opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible\_collections/community/general
> Loading callback plugin default of type stdout, v2.0 from /opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/plugins/callback/default.py
> Attempting to use 'junit' callback.
> Attempting to use 'minimal' callback.
> Skipping callback 'minimal', as we already have a stdout callback.
> Attempting to use 'oneline' callback.
> Skipping callback 'oneline', as we already have a stdout callback.
> Attempting to use 'tree' callback.
> 
> PLAYBOOK: manage\_users\_and\_groups.yml \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> Positional arguments: playbooks/manage\_users\_and\_groups.yml
> verbosity: 5
> private\_key\_file: /Users/chris/.ssh/staging\_ansible\_id\_ed25519
> remote\_user: staging\_ansible
> connection: ssh
> become\_method: sudo
> tags: ('all',)
> skip\_tags: ('to\_skip',)
> inventory: ('/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/inventory/staging/staging',)
> subset: capsule-v-001-mm037
> forks: 5
> 1 plays in playbooks/manage\_users\_and\_groups.yml
> 
> PLAY \[All common roles\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> TASK \[Gathering Facts\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> task path: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/playbooks/manage\_users\_and\_groups.yml:4
> Including module\_utils file ansible/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_internal/\_ansiballz/\_loader.py
> Including module\_utils file ansible/module\_utils/\_internal/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_internal/\_ansiballz/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_internal/\_errors.py
> Including module\_utils file ansible/module\_utils/\_internal/\_json/\_profiles/\_module\_legacy\_c2m.py
> Including module\_utils file ansible/module\_utils/\_internal/\_json/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_internal/\_json/\_profiles/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_internal/\_datatag/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_internal/\_dataclass\_validation.py
> Including module\_utils file ansible/module\_utils/\_internal/\_datatag/\_tags.py
> Including module\_utils file ansible/module\_utils/\_internal/\_json/\_profiles/\_module\_legacy\_m2c.py
> Including module\_utils file ansible/module\_utils/\_internal/\_messages.py
> Including module\_utils file ansible/module\_utils/\_internal/\_patches/\_socket\_patch.py
> Including module\_utils file ansible/module\_utils/\_internal/\_patches/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_internal/\_patches/\_sys\_intern\_patch.py
> Including module\_utils file ansible/module\_utils/\_internal/\_traceback.py
> Including module\_utils file ansible/module\_utils/\_internal/\_stack.py
> Including module\_utils file ansible/module\_utils/basic.py
> Including module\_utils file ansible/module\_utils/\_internal/\_debugging.py
> Including module\_utils file ansible/module\_utils/\_internal/\_deprecator.py
> Including module\_utils file ansible/module\_utils/\_internal/\_plugin\_info.py
> Including module\_utils file ansible/module\_utils/\_internal/\_validation.py
> Including module\_utils file ansible/module\_utils/common/\_utils.py
> Including module\_utils file ansible/module\_utils/common/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/common/arg\_spec.py
> Including module\_utils file ansible/module\_utils/common/file.py
> Including module\_utils file ansible/module\_utils/common/json.py
> Including module\_utils file ansible/module\_utils/\_internal/\_json/\_legacy\_encoder.py
> Including module\_utils file ansible/module\_utils/\_internal/\_json/\_profiles/\_tagless.py
> Including module\_utils file ansible/module\_utils/common/locale.py
> Including module\_utils file ansible/module\_utils/common/parameters.py
> Including module\_utils file ansible/module\_utils/common/collections.py
> Including module\_utils file ansible/module\_utils/common/process.py
> Including module\_utils file ansible/module\_utils/common/sys\_info.py
> Including module\_utils file ansible/module\_utils/common/text/converters.py
> Including module\_utils file ansible/module\_utils/common/text/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/common/text/formatters.py
> Including module\_utils file ansible/module\_utils/common/validation.py
> Including module\_utils file ansible/module\_utils/common/warnings.py
> Including module\_utils file ansible/module\_utils/\_internal/\_event\_utils.py
> Including module\_utils file ansible/module\_utils/\_internal/\_text\_utils.py
> Including module\_utils file ansible/module\_utils/compat/selinux.py
> Including module\_utils file ansible/module\_utils/compat/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/compat/typing.py
> Including module\_utils file ansible/module\_utils/\_internal/\_patches/\_dataclass\_annotation\_patch.py
> Including module\_utils file ansible/module\_utils/datatag.py
> Including module\_utils file ansible/module\_utils/distro/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/distro/\_distro.py
> Including module\_utils file ansible/module\_utils/errors.py
> Including module\_utils file ansible/module\_utils/facts/ansible\_collector.py
> Including module\_utils file ansible/module\_utils/facts/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/facts/collector.py
> Including module\_utils file ansible/module\_utils/facts/compat.py
> Including module\_utils file ansible/module\_utils/facts/default\_collectors.py
> Including module\_utils file ansible/module\_utils/facts/hardware/aix.py
> Including module\_utils file ansible/module\_utils/facts/hardware/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/facts/hardware/base.py
> Including module\_utils file ansible/module\_utils/facts/hardware/darwin.py
> Including module\_utils file ansible/module\_utils/facts/hardware/dragonfly.py
> Including module\_utils file ansible/module\_utils/facts/hardware/freebsd.py
> Including module\_utils file ansible/module\_utils/facts/hardware/hpux.py
> Including module\_utils file ansible/module\_utils/facts/hardware/hurd.py
> Including module\_utils file ansible/module\_utils/facts/hardware/linux.py
> Including module\_utils file ansible/module\_utils/\_internal/\_concurrent/\_futures.py
> Including module\_utils file ansible/module\_utils/\_internal/\_concurrent/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_internal/\_concurrent/\_daemon\_threading.py
> Including module\_utils file ansible/module\_utils/facts/hardware/netbsd.py
> Including module\_utils file ansible/module\_utils/facts/hardware/openbsd.py
> Including module\_utils file ansible/module\_utils/facts/hardware/sunos.py
> Including module\_utils file ansible/module\_utils/facts/namespace.py
> Including module\_utils file ansible/module\_utils/facts/network/aix.py
> Including module\_utils file ansible/module\_utils/facts/network/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/facts/network/base.py
> Including module\_utils file ansible/module\_utils/facts/network/darwin.py
> Including module\_utils file ansible/module\_utils/facts/network/dragonfly.py
> Including module\_utils file ansible/module\_utils/facts/network/fc\_wwn.py
> Including module\_utils file ansible/module\_utils/facts/network/freebsd.py
> Including module\_utils file ansible/module\_utils/facts/network/generic\_bsd.py
> Including module\_utils file ansible/module\_utils/facts/network/hpux.py
> Including module\_utils file ansible/module\_utils/facts/network/hurd.py
> Including module\_utils file ansible/module\_utils/facts/network/iscsi.py
> Including module\_utils file ansible/module\_utils/facts/network/linux.py
> Including module\_utils file ansible/module\_utils/facts/network/netbsd.py
> Including module\_utils file ansible/module\_utils/facts/network/nvme.py
> Including module\_utils file ansible/module\_utils/facts/network/openbsd.py
> Including module\_utils file ansible/module\_utils/facts/network/sunos.py
> Including module\_utils file ansible/module\_utils/facts/other/facter.py
> Including module\_utils file ansible/module\_utils/facts/other/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/facts/other/ohai.py
> Including module\_utils file ansible/module\_utils/facts/sysctl.py
> Including module\_utils file ansible/module\_utils/facts/system/apparmor.py
> Including module\_utils file ansible/module\_utils/facts/system/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/facts/system/caps.py
> Including module\_utils file ansible/module\_utils/facts/system/chroot.py
> Including module\_utils file ansible/module\_utils/facts/system/cmdline.py
> Including module\_utils file ansible/module\_utils/facts/system/date\_time.py
> Including module\_utils file ansible/module\_utils/facts/system/distribution.py
> Including module\_utils file ansible/module\_utils/facts/system/dns.py
> Including module\_utils file ansible/module\_utils/facts/system/env.py
> Including module\_utils file ansible/module\_utils/facts/system/fips.py
> Including module\_utils file ansible/module\_utils/facts/system/loadavg.py
> Including module\_utils file ansible/module\_utils/facts/system/local.py
> Including module\_utils file ansible/module\_utils/facts/system/lsb.py
> Including module\_utils file ansible/module\_utils/facts/system/pkg\_mgr.py
> Including module\_utils file ansible/module\_utils/facts/system/platform.py
> Including module\_utils file ansible/module\_utils/facts/system/python.py
> Including module\_utils file ansible/module\_utils/facts/system/selinux.py
> Including module\_utils file ansible/module\_utils/facts/system/service\_mgr.py
> Including module\_utils file ansible/module\_utils/compat/version.py
> Including module\_utils file ansible/module\_utils/facts/system/ssh\_pub\_keys.py
> Including module\_utils file ansible/module\_utils/facts/system/systemd.py
> Including module\_utils file ansible/module\_utils/facts/system/user.py
> Including module\_utils file ansible/module\_utils/facts/timeout.py
> Including module\_utils file ansible/module\_utils/facts/utils.py
> Including module\_utils file ansible/module\_utils/facts/virtual/base.py
> Including module\_utils file ansible/module\_utils/facts/virtual/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/facts/virtual/dragonfly.py
> Including module\_utils file ansible/module\_utils/facts/virtual/freebsd.py
> Including module\_utils file ansible/module\_utils/facts/virtual/hpux.py
> Including module\_utils file ansible/module\_utils/facts/virtual/linux.py
> Including module\_utils file ansible/module\_utils/facts/virtual/netbsd.py
> Including module\_utils file ansible/module\_utils/facts/virtual/openbsd.py
> Including module\_utils file ansible/module\_utils/facts/virtual/sunos.py
> Including module\_utils file ansible/module\_utils/facts/virtual/sysctl.py
> Including module\_utils file ansible/module\_utils/parsing/convert\_bool.py
> Including module\_utils file ansible/module\_utils/parsing/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/six/\_\_init\_\_.py
> \<capsule-v-001-mm037\> Attempting python interpreter discovery.
> \<10.210.106.47\> ESTABLISH SSH CONNECTION FOR USER: staging\_ansible
> \<10.210.106.47\> SSH: ansible.cfg set ssh\_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
> \<10.210.106.47\> SSH: ANSIBLE\_PRIVATE\_KEY\_FILE/private\_key\_file/ansible\_ssh\_private\_key\_file set: (-o)(IdentityFile="/Users/chris/.ssh/staging\_ansible\_id\_ed25519")
> \<10.210.106.47\> SSH: ansible\_password/ansible\_ssh\_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
> \<10.210.106.47\> SSH: ANSIBLE\_REMOTE\_USER/remote\_user/ansible\_user/user/-u set: (-o)(User="staging\_ansible")
> \<10.210.106.47\> SSH: ANSIBLE\_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
> \<10.210.106.47\> SSH: Set ssh\_common\_args: ()
> \<10.210.106.47\> SSH: Set ssh\_extra\_args: ()
> \<10.210.106.47\> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath="/Users/chris/.ansible/cp/2e613f8131")
> \<10.210.106.47\> SSH: Restrict number of password prompts in case incorrect password is provided.: (-o)(NumberOfPasswordPrompts=1)
> \<10.210.106.47\> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/Users/chris/.ssh/staging\_ansible\_id\_ed25519"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="staging\_ansible"' -o ConnectTimeout=10 -o 'ControlPath="/Users/chris/.ansible/cp/2e613f8131"' -o NumberOfPasswordPrompts=1 10.210.106.47 '/bin/sh -c '"'"'echo FOUND; command -v '"'"'"'"'"'"'"'"'python3.13'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.12'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.11'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.10'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.9'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.8'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'/usr/bin/python3'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3'"'"'"'"'"'"'"'"'; echo ENDFOUND && sleep 0'"'"''
> \<10.210.106.47\> (0, b'FOUND\\n/usr/bin/python3\\n/usr/bin/python3\\nENDFOUND\\n', b'')
> Using module file /opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/modules/setup.py
> Pipelining is enabled.
> \<10.210.106.47\> ESTABLISH SSH CONNECTION FOR USER: staging\_ansible
> \<10.210.106.47\> SSH: ansible.cfg set ssh\_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
> \<10.210.106.47\> SSH: ANSIBLE\_PRIVATE\_KEY\_FILE/private\_key\_file/ansible\_ssh\_private\_key\_file set: (-o)(IdentityFile="/Users/chris/.ssh/staging\_ansible\_id\_ed25519")
> \<10.210.106.47\> SSH: ansible\_password/ansible\_ssh\_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
> \<10.210.106.47\> SSH: ANSIBLE\_REMOTE\_USER/remote\_user/ansible\_user/user/-u set: (-o)(User="staging\_ansible")
> \<10.210.106.47\> SSH: ANSIBLE\_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
> \<10.210.106.47\> SSH: Set ssh\_common\_args: ()
> \<10.210.106.47\> SSH: Set ssh\_extra\_args: ()
> \<10.210.106.47\> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath="/Users/chris/.ansible/cp/2e613f8131")
> \<10.210.106.47\> SSH: Restrict number of password prompts in case incorrect password is provided.: (-o)(NumberOfPasswordPrompts=1)
> \<10.210.106.47\> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/Users/chris/.ssh/staging\_ansible\_id\_ed25519"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="staging\_ansible"' -o ConnectTimeout=10 -o 'ControlPath="/Users/chris/.ansible/cp/2e613f8131"' -o NumberOfPasswordPrompts=1 10.210.106.47 '/bin/sh -c '"'"'sudo --non-interactive -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-bhiouucrbnnkwcjekhgxhoysifovmsyl ; /usr/bin/python3'"'"'"'"'"'"'"'"' && sleep 0'"'"''
> \<10.210.106.47\> Escalation succeeded
> \<10.210.106.47\> (0, b'\\n{"ansible\_facts": {"ansible\_env": {"TERM": "unknown", "SHELL": "/bin/zsh", "USER": "root", "SUDO\_USER": "staging\_ansible", "SUDO\_UID": "20001", "MAIL": "/var/mail/root", "PATH": "/usr/bin:/bin:/usr/sbin:/sbin", "PWD": "/private/var/home/staging\_ansible", "SHLVL": "1", "SUDO\_COMMAND": "/bin/sh -c echo BECOME-SUCCESS-bhiouucrbnnkwcjekhgxhoysifovmsyl ; /usr/bin/python3", "HOME": "/var/home/staging\_ansible", "LOGNAME": "root", "SUDO\_GID": "20001", "\_": "/usr/bin/python3", "\_\_CF\_USER\_TEXT\_ENCODING": "0x0:0:0", "SDKROOT": "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk", "CPATH": "/usr/local/include", "LIBRARY\_PATH": "/usr/local/lib", "MANPATH": "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/share/man:/Library/Developer/CommandLineTools/usr/share/man:/Library/Developer/CommandLineTools/Toolchains/XcodeDefault.xctoolchain/usr/share/man:", "LC\_CTYPE": "C.UTF-8"}, "ansible\_is\_chroot": false, "ansible\_system": "Darwin", "ansible\_kernel": "24.4.0", "ansible\_kernel\_version": "Darwin Kernel Version 24.4.0: Wed Mar 19 21:11:02 PDT 2025; root:xnu-11417.101.15~1/RELEASE\_ARM64\_T8132", "ansible\_machine": "arm64", "ansible\_python\_version": "3.9.6", "ansible\_fqdn": "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa", "ansible\_hostname": "CAPSULE-V-001-MM037", "ansible\_nodename": "CAPSULE-V-001-MM037.local", "ansible\_domain": "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa", "ansible\_userspace\_bits": "64", "ansible\_architecture": "arm64", "ansible\_model": "Mac16,10", "ansible\_product\_name": "Mac16,10", "ansible\_osversion": "24E248", "ansible\_osrevision": "199506", "ansible\_processor": "Apple M4", "ansible\_processor\_cores": "10", "ansible\_processor\_vcpus": "10", "ansible\_memtotal\_mb": 24576, "ansible\_memfree\_mb": 3627, "ansible\_uptime\_seconds": 1507979, "ansible\_lsb": {}, "ansible\_distribution": "MacOSX", "ansible\_distribution\_release": "24.4.0", "ansible\_distribution\_version": "15.4", "ansible\_distribution\_major\_version": "15", "ansible\_os\_family": "Darwin", "ansible\_interfaces": \["anpi0", "anpi1", "anpi3", "ap1", "awdl0", "bridge0", "en0", "en1", "en2", "en3", "en4", "en5", "en6", "en7", "gif0", "llw0", "lo0", "stf0", "utun0", "utun1", "utun2", "utun3"\], "ansible\_lo0": {"device": "lo0", "ipv4": \[{"address": "127.0.0.1", "netmask": "255.0.0.0", "network": "127.0.0.0", "broadcast": "127.255.255.255"}\], "ipv6": \[{"address": "::1", "prefix": "128"}, {"address": "fe80::1%lo0", "prefix": "64", "scope": "0x1"}\], "type": "loopback", "flags": \["UP", "LOOPBACK", "RUNNING", "MULTICAST"\], "macaddress": "unknown", "mtu": "16384", "options": \["PERFORMNUD", "DAD"\]}, "ansible\_gif0": {"device": "gif0", "ipv4": \[\], "ipv6": \[\], "type": "unknown", "flags": \["POINTOPOINT", "MULTICAST"\], "macaddress": "unknown", "mtu": "1280"}, "ansible\_stf0": {"device": "stf0", "ipv4": \[\], "ipv6": \[\], "type": "unknown", "flags": \[\], "macaddress": "unknown", "mtu": "1280"}, "ansible\_anpi1": {"device": "anpi1", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "7e:ed:2e:b3:ac:2f", "mtu": "1500", "options": \["CHANNEL\_IO"\], "media": "Unknown", "media\_select": "none", "status": "inactive"}, "ansible\_anpi3": {"device": "anpi3", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "7e:ed:2e:b3:ac:31", "mtu": "1500", "options": \["CHANNEL\_IO"\], "media": "Unknown", "media\_select": "none", "status": "inactive"}, "ansible\_anpi0": {"device": "anpi0", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "7e:ed:2e:b3:ac:2e", "mtu": "1500", "options": \["CHANNEL\_IO"\], "media": "Unknown", "media\_select": "none", "status": "inactive"}, "ansible\_en5": {"device": "en5", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "7e:ed:2e:b3:ac:0e", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "none", "status": "inactive"}, "ansible\_en6": {"device": "en6", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "7e:ed:2e:b3:ac:0f", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "none", "status": "inactive"}, "ansible\_en7": {"device": "en7", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "7e:ed:2e:b3:ac:11", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "none", "status": "inactive"}, "ansible\_en2": {"device": "en2", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "PROMISC", "SIMPLEX", "MULTICAST"\], "macaddress": "36:bf:f5:38:f8:80", "mtu": "1500", "options": \["TSO4", "TSO6", "CHANNEL\_IO"\], "media": "Unknown", "media\_select": "autoselect", "media\_type": "full-duplex", "status": "inactive"}, "ansible\_en3": {"device": "en3", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "PROMISC", "SIMPLEX", "MULTICAST"\], "macaddress": "36:bf:f5:38:f8:84", "mtu": "1500", "options": \["TSO4", "TSO6", "CHANNEL\_IO"\], "media": "Unknown", "media\_select": "autoselect", "media\_type": "full-duplex", "status": "inactive"}, "ansible\_en4": {"device": "en4", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "PROMISC", "SIMPLEX", "MULTICAST"\], "macaddress": "36:bf:f5:38:f8:8c", "mtu": "1500", "options": \["TSO4", "TSO6", "CHANNEL\_IO"\], "media": "Unknown", "media\_select": "autoselect", "media\_type": "full-duplex", "status": "inactive"}, "ansible\_ap1": {"device": "ap1", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "3e:a1:09:7e:dc:98", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "autoselect", "media\_type": "none", "status": "inactive"}, "ansible\_en1": {"device": "en1", "ipv4": \[\], "ipv6": \[{"address": "fe80::1848:57fd:ab6f:f72b%en1", "prefix": "64"}\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "46:20:95:8d:3c:c1", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "autoselect", "media\_type": "none"}, "ansible\_awdl0": {"device": "awdl0", "ipv4": \[\], "ipv6": \[{"address": "fe80::bce1:38ff:fefd:a346%awdl0", "prefix": "64", "scope": "0xf"}\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "be:e1:38:fd:a3:46", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "autoselect", "status": "active"}, "ansible\_llw0": {"device": "llw0", "ipv4": \[\], "ipv6": \[{"address": "fe80::bce1:38ff:fefd:a346%llw0", "prefix": "64", "scope": "0x10"}\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "be:e1:38:fd:a3:46", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "autoselect", "media\_type": "none"}, "ansible\_en0": {"device": "en0", "ipv4": \[{"address": "10.210.106.47", "netmask": "255.255.255.0", "network": "10.210.106.0", "broadcast": "10.210.106.255"}\], "ipv6": \[{"address": "fe80::74:1680:3411:1cc1%en0", "prefix": "64"}\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "d0:11:e5:b1:a3:22", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "autoselect", "media\_type": "10Gbase-", "media\_options": \["full-duplex"\], "status": "active"}, "ansible\_bridge0": {"device": "bridge0", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "36:bf:f5:38:f8:80", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "Unknown", "media\_type": "unknown type", "status": "inactive"}, "ansible\_utun0": {"device": "utun0", "ipv4": \[\], "ipv6": \[{"address": "fe80::76bd:b46e:783d:5c38%utun0", "prefix": "64", "scope": "0x13"}\], "type": "unknown", "flags": \["UP", "POINTOPOINT", "RUNNING", "MULTICAST"\], "macaddress": "unknown", "mtu": "1380", "options": \["PERFORMNUD", "DAD"\]}, "ansible\_utun1": {"device": "utun1", "ipv4": \[\], "ipv6": \[{"address": "fe80::fee4:e473:d665:f5e%utun1", "prefix": "64", "scope": "0x14"}\], "type": "unknown", "flags": \["UP", "POINTOPOINT", "RUNNING", "MULTICAST"\], "macaddress": "unknown", "mtu": "2000", "options": \["PERFORMNUD", "DAD"\]}, "ansible\_utun2": {"device": "utun2", "ipv4": \[\], "ipv6": \[{"address": "fe80::ce81:b1c:bd2c:69e%utun2", "prefix": "64", "scope": "0x15"}\], "type": "unknown", "flags": \["UP", "POINTOPOINT", "RUNNING", "MULTICAST"\], "macaddress": "unknown", "mtu": "1000", "options": \["PERFORMNUD", "DAD"\]}, "ansible\_utun3": {"device": "utun3", "ipv4": \[\], "ipv6": \[{"address": "fe80::bcaa:8fad:d071:320e%utun3", "prefix": "64", "scope": "0x16"}\], "type": "unknown", "flags": \["UP", "POINTOPOINT", "RUNNING", "MULTICAST"\], "macaddress": "unknown", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\]}, "ansible\_default\_ipv4": {"gateway": "10.210.106.1", "interface": "en0", "device": "en0", "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "d0:11:e5:b1:a3:22", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "autoselect", "media\_type": "10Gbase-", "media\_options": \["full-duplex"\], "status": "active", "address": "10.210.106.47", "netmask": "255.255.255.0", "network": "10.210.106.0", "broadcast": "10.210.106.255"}, "ansible\_default\_ipv6": {}, "ansible\_all\_ipv4\_addresses": \["10.210.106.47"\], "ansible\_all\_ipv6\_addresses": \["fe80::1848:57fd:ab6f:f72b%en1", "fe80::bce1:38ff:fefd:a346%awdl0", "fe80::bce1:38ff:fefd:a346%llw0", "fe80::74:1680:3411:1cc1%en0", "fe80::76bd:b46e:783d:5c38%utun0", "fe80::fee4:e473:d665:f5e%utun1", "fe80::ce81:b1c:bd2c:69e%utun2", "fe80::bcaa:8fad:d071:320e%utun3"\], "ansible\_ssh\_host\_key\_dsa\_public": "AAAAB3NzaC1kc3MAAACBAPur8QlyLLw+6UKYFu7aTlQ21IgbU89jBX7LAJ7FenNLe/weXo9xHKF7oG8kSSjoOzQNlnPScMLlre29HlWKNd8IjD+SzjVwzF3vVto8O65BYhrYT0vam1Ts56UoEhgIr+51B55OKGoHdzsgQGkQYUwrIsRboW1MJGToqdQlUBtbAAAAFQDw4z9gagusRN1pPkqUsvn49P8vIwAAAIEA6eiytuZ6SOym1L1EGjKM/YRiFD5wPaj/uKnMJn+QT1ctlU2U+V2pD4lclDThbK1Utvf6c/h0Id2l59K8vk3FwexSyBaFHr+/JILRVPcRX9XxPVih0OjbrY8EHSiPtz6IQ8IVbFYOMSfqzq+wD6VHMCyrpVqU4FodBRNbShghFIgAAACBAIGpnSzbUSl3YLygIXkTsk8orSXwSAB74vZImlbqbrVmDZpycdQJ2Q82GaOCQaW+YCRUI9jd9/40FJPuee8GOU3bGYzBDruWTi9XGlCtuIHP1sSc7XZUSw3bCGes/W406SLNkSll469LNqo2ZaPY0WLyrD3GpIsJK6F1jht/MKs6", "ansible\_ssh\_host\_key\_dsa\_public\_keytype": "ssh-dss", "ansible\_ssh\_host\_key\_rsa\_public": "AAAAB3NzaC1yc2EAAAADAQABAAABgQDMb0Gz3tmMIjfXrOWhPas1Gehsg28RzBlg21l0eAsJfxp+VAh9O6uVWWG7O7kW8goyOiid/OSyujh+Nu/oxba5wFbEYbTU/9ncBKTdlx/KGZjztoO2TcXzuYXnCActCCOsdS1zMP783rZXJnPDsHaqrBs9BM4Ke6ok/3a1lVXBp2UIPB/RX0JEiE5+/ouPVIDiEJnKZ9KWx0PT56Hn3T7vyFO1wPtq37B2B/75iDDslGObtH5ENcKRpAAj+FvMq59UEex+LiaurTPtSLB1bQfksRAkv2VCMyr1GM2Wku0j8K1eNG/mhgTDdzNYN3wLXIo/b+jDEcNQulascpxxzjDgdWZa5mOigz0S64XBwuR28AgfyO+dsyWDWn2JbExcHKzgL7/Dd1E5jVRiQrgC/dWz+eUuXYAaSSC4sKrjPSP20wBjQYmziNm6d7vBwvyf7y9em+WkJADhKubEKIx+1s9pbEqGwKq8U9QxL+79ENWawCiCal5QDPUR8T1wRoWfn8M=", "ansible\_ssh\_host\_key\_rsa\_public\_keytype": "ssh-rsa", "ansible\_ssh\_host\_key\_ecdsa\_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBC6MMFJ3osh8+vAnn6iFNYxc8CRVWZlgs+LoET7fc0nFC9zYc3xjmiMvmQbMX78mSBW6hD0FsyLYFw1weBXKTzE=", "ansible\_ssh\_host\_key\_ecdsa\_public\_keytype": "ecdsa-sha2-nistp256", "ansible\_ssh\_host\_key\_ed25519\_public": "AAAAC3NzaC1lZDI1NTE5AAAAIL41X5HM1EUb+ak8y0/8yANS3CcPZtbCY7AehiqjnB/R", "ansible\_ssh\_host\_key\_ed25519\_public\_keytype": "ssh-ed25519", "ansible\_dns": {"nameservers": \["8.8.8.8"\]}, "ansible\_user\_id": "root", "ansible\_user\_uid": 0, "ansible\_user\_gid": 0, "ansible\_user\_gecos": "System Administrator", "ansible\_user\_dir": "/var/root", "ansible\_user\_shell": "/bin/zsh", "ansible\_real\_user\_id": 0, "ansible\_effective\_user\_id": 0, "ansible\_real\_group\_id": 0, "ansible\_effective\_group\_id": 0, "ansible\_iscsi\_iqn": "", "ansible\_selinux": {"status": "Missing selinux Python library"}, "ansible\_selinux\_python\_present": false, "ansible\_hostnqn": "", "ansible\_fips": false, "ansible\_loadavg": {"1m": 2.576171875, "5m": 2.31689453125, "15m": 2.0439453125}, "ansible\_virtualization\_type": "", "ansible\_virtualization\_role": "", "ansible\_virtualization\_tech\_guest": \[\], "ansible\_virtualization\_tech\_host": \[\], "ansible\_system\_capabilities\_enforced": "N/A", "ansible\_system\_capabilities": "N/A", "ansible\_apparmor": {"status": "disabled"}, "ansible\_date\_time": {"year": "2025", "month": "09", "weekday": "Monday", "weekday\_number": "1", "weeknumber": "38", "day": "22", "hour": "18", "minute": "37", "second": "36", "epoch": "1758591456", "epoch\_int": "1758591456", "date": "2025-09-22", "time": "18:37:36", "iso8601\_micro": "2025-09-23T01:37:36.844721Z", "iso8601": "2025-09-23T01:37:36Z", "iso8601\_basic": "20250922T183736844721", "iso8601\_basic\_short": "20250922T183736", "tz": "PDT", "tz\_dst": "PDT", "tz\_offset": "-0700"}, "ansible\_local": {}, "ansible\_fibre\_channel\_wwn": \[\], "ansible\_python": {"version": {"major": 3, "minor": 9, "micro": 6, "releaselevel": "final", "serial": 0}, "version\_info": \[3, 9, 6, "final", 0\], "executable": "/Library/Developer/CommandLineTools/usr/bin/python3", "has\_sslcontext": true, "type": "cpython"}, "ansible\_pkg\_mgr": "homebrew", "ansible\_service\_mgr": "launchd", "gather\_subset": \["all"\], "module\_setup": true}, "invocation": {"module\_args": {"gather\_subset": \["all"\], "gather\_timeout": 10, "filter": \[\], "fact\_path": "/etc/ansible/facts.d"}}}\\n', b'')
> ok: \[capsule-v-001-mm037\]
> 
> TASK \[common : include\_tasks\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> task path: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/main.yml:26
> included: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/rm\_groups.yml for capsule-v-001-mm037
> 
> TASK \[common : user management remove global groups linux\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> task path: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/rm\_groups.yml:7
> skipping: \[capsule-v-001-mm037\] =\> (item=None) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "false\_condition": "(global\_groups\[item\].state|default('present')) == 'absent'",
> "item": null,
> "skip\_reason": "Conditional result was False"
> }
> skipping: \[capsule-v-001-mm037\] =\> {
> "changed": false,
> "msg": "All items skipped"
> }
> 
> TASK \[common : user management remove local groups linux\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> task path: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/rm\_groups.yml:20
> skipping: \[capsule-v-001-mm037\] =\> {
> "changed": false,
> "skipped\_reason": "No items in the list"
> }
> 
> TASK \[common : include\_tasks\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> task path: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/main.yml:32
> included: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/add\_groups.yml for capsule-v-001-mm037
> 
> TASK \[common : debug global\_groups\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> task path: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/add\_groups.yml:20
> ok: \[capsule-v-001-mm037\] =\> {
> "test\_global\_groups": {
> "gnupgserver": {
> "gid": 10506
> },
> "grafana": {
> "gid": 10501
> },
> "nginx": {
> "gid": 10505
> },
> "production\_ansible": {
> "gid": 10001
> },
> "prometheus": {
> "gid": 10502
> },
> "rundeck": {
> "gid": 10504
> },
> "sequoia": {
> "gid": 10507
> },
> "staging\_ansible": {
> "gid": 20001
> },
> "zookeeper": {
> "gid": 10503
> }
> }
> }
> 
> TASK \[common : user management set global groups macOS\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> task path: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/add\_groups.yml:24
> \[ERROR\]: Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'
> 
> Task failed.
> Origin: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/add\_groups.yml:24:3
> 
> 22 var: test\_global\_groups
> 23
> 24 - name: user management set global groups macOS
> ^ column 3
> 
> \<\<\< caused by \>\>\>
> 
> Finalization of task args for 'ansible.builtin.group' failed.
> Origin: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/add\_groups.yml:28:3
> 
> 26 - user\_mgmt
> 27 - admin\_accounts
> 28 group:
> ^ column 3
> 
> \<\<\< caused by \>\>\>
> 
> Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'
> Origin: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/add\_groups.yml:30:10
> 
> 28 group:
> 29 name: "{{ item.key }}"
> 30 gid: "{{ item.gid }}"
> ^ column 10
> 
> failed: \[capsule-v-001-mm037\] (item={'key': 'production\_ansible', 'value': {'gid': 10001}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "production\_ansible",
> "value": {
> "gid": 10001
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> failed: \[capsule-v-001-mm037\] (item={'key': 'staging\_ansible', 'value': {'gid': 20001}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "staging\_ansible",
> "value": {
> "gid": 20001
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> failed: \[capsule-v-001-mm037\] (item={'key': 'grafana', 'value': {'gid': 10501}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "grafana",
> "value": {
> "gid": 10501
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> failed: \[capsule-v-001-mm037\] (item={'key': 'prometheus', 'value': {'gid': 10502}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "prometheus",
> "value": {
> "gid": 10502
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> failed: \[capsule-v-001-mm037\] (item={'key': 'zookeeper', 'value': {'gid': 10503}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "zookeeper",
> "value": {
> "gid": 10503
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> failed: \[capsule-v-001-mm037\] (item={'key': 'rundeck', 'value': {'gid': 10504}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "rundeck",
> "value": {
> "gid": 10504
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> failed: \[capsule-v-001-mm037\] (item={'key': 'nginx', 'value': {'gid': 10505}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "nginx",
> "value": {
> "gid": 10505
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> failed: \[capsule-v-001-mm037\] (item={'key': 'gnupgserver', 'value': {'gid': 10506}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "gnupgserver",
> "value": {
> "gid": 10506
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> failed: \[capsule-v-001-mm037\] (item={'key': 'sequoia', 'value': {'gid': 10507}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "sequoia",
> "value": {
> "gid": 10507
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> \[capsule-v-001-mm037\] TASK: common : user management set global groups macOS (debug)\> \[ERROR\]: Unexpected Exception, this is probably a bug: \[Errno 1\] Operation not permitted
> 
> Traceback (most recent call last):
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/cli/\_\_init\_\_.py", line 660, in cli\_executor
> exit\_code = cli.run()
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/cli/playbook.py", line 153, in run
> results = pbex.run()
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/executor/playbook\_executor.py", line 188, in run
> result = self.\_tqm.run(play=play)
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/executor/task\_queue\_manager.py", line 344, in run
> play\_return = strategy.run(iterator, play\_context)
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/plugins/strategy/linear.py", line 216, in run
> results.extend(self.\_wait\_on\_pending\_results(iterator))
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/plugins/strategy/\_\_init\_\_.py", line 793, in \_wait\_on\_pending\_results
> results = self.\_process\_pending\_results(iterator)
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/plugins/strategy/\_\_init\_\_.py", line 169, in inner
> dbg.cmdloop()
> ~~~~~~~~~~~ ^^
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/plugins/strategy/\_\_init\_\_.py", line 1139, in cmdloop
> cmd.Cmd.cmdloop(self)
> ~~~~~~~~~~~~~~~ ^^^^^^
> File "/opt/homebrew/Cellar/python@3.13/3.13.7/Frameworks/Python.framework/Versions/3.13/lib/python3.13/cmd.py", line 134, in cmdloop
> line = input(self.prompt)
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/executor/process/worker.py", line 110, in \_term
> os.killpg(self.pid, signum)
> ~~~~~~~~~ ^^^^^^^^^^^^^^^^^^
> PermissionError: \[Errno 1\] Operation not permitted
> 
> The above exception was the direct cause of the following exception:
> 
> Traceback (most recent call last):
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/cli/\_\_init\_\_.py", line 669, in cli\_executor
> raise AnsibleError("Unexpected Exception, this is probably a bug.") from ex
> ansible.errors.AnsibleError: Unexpected Exception, this is probably a bug: \[Errno 1\] Operation not permitted
> \`\`\`
> 
> \### Code of Conduct
> 
> \- \[x\] I agree to follow the Ansible Code of Conduct

---

<div class="post-metadata">

**Author:** ![utoddl](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/utoddl/32/249_2.png) [@utoddl](https://forum.ansible.com/u/utoddl)\
**Post date:** [September 23, 2025, 2:51am UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/22 "2025-09-23T02:51:40Z")

</div>

> [@Gittes](#):
>
> The debug still works and sees the gid or the items in the dictionary

You keep saying that, but it isn’t doing what you think it’s doing. It’s simply printing the value of the dictionary. A much more informative `debug` task would be one that loops over the data the same way your `ansible.builtin.group` task does:

```yaml
- name: Display loop items from test_global_groups
  ansible.builtin.debug:
    msg: '{{ item }}'
  loop: '{{ test_global_groups | dict2items }}'

```

The error from the second task - the `ansible.builtin.group` task - is telling you that ~~the first conditional in your `when:` clause is broken.~~ the `item` has no `gid` at the top level. It’s `item.value.gid`.

@flowerysong told you to look carefully and compare the working code (the first snippet in that post) to the broken code (the second snippet). ~~You fixed the `name:`, `gid:`, `state:` and `loop:` lines, but you didn’t fix the `when:` conditions.~~  
[Edit: on second reading, I see you didn’t actually fix those lines. My mistake.]

> [@Gittes](#):
>
> How else can I debug ansible-playbook?

The most important next steps are to (a) read the error messages (b) believe them when they say there’s a problem with your code.

---

<div class="post-metadata">

**Author:** ![utoddl](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/utoddl/32/249_2.png) [@utoddl](https://forum.ansible.com/u/utoddl)\
**Post date:** [September 23, 2025, 2:55am UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/23 "2025-09-23T02:55:06Z")

</div>

> [@Gittes](#):
>
> I filed a bug issue on Ansible GitHub

Please stop doing that! The result you are seeing is exactly what should be produced given the inputs you’ve shown us. The bug tracker on GitHub is for pointing out things that need to be fixed in Ansible, not for explaining to users why their code doesn’t do what they expect. Filing errant bug reports wastes time of other people. This forum is the correct way to get help with these issues.

---

<div class="post-metadata">

**Author:** ![flowerysong](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/flowerysong/32/2305_2.png) [@flowerysong](https://forum.ansible.com/u/flowerysong)\
**Post date:** [September 23, 2025, 3:01am UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/24 "2025-09-23T03:01:15Z")

</div>

Okay, so you went with the `dict2items` option. Here is the code you were given for that:

```yaml
    - name: User management set global groups macOS
      tags:
        - user_mgmt
        - admin_accounts
      ansible.builtin.group:
        name: "{{ item.key }}"
        gid: "{{ item.value.gid | mandatory }}"
        state: "{{ item.value.state | default('present') }}"
      loop: '{{ global_groups | dict2items }}'
      when:
        - (item.value.state | default('present')) == 'present'

```

This is the code you ran:

```yaml
- name: user management set global groups macOS
  tags:
    - user_mgmt
    - admin_accounts
  group:
    name: "{{ item.key }}"
    gid: "{{ item.gid }}"
    state: "{{ item.state | default('present') }}"
  loop: "{{ test_global_groups | dict2items }}"
  when:
    - (test_global_groups[item].state|default('present')) == 'present'

```

You see that they are different? Please make them not be different. Run the code you were told would work, and if it produces an error we can move on to fixing that error. Until then you’re just running into errors that you’ve already been told how to fix.

EDIT: Okay, they can be a little different, as a treat. Here’s yet another working solution that’s closer to how I would actually write the task, which means:

- fixing the other condition that up until now we’ve been ignoring because it won’t result in an error.
- removing the currently useless templating of `state:` (this can only ever result in `present` given the `when:` condition).
- getting rid of the unnecessary `mandatory`.

```yaml
- name: User management set global groups macOS
  tags:
    - user_mgmt
    - admin_accounts
  ansible.builtin.group:
    name: "{{ item.key }}"
    gid: "{{ item.value.gid }}"
    state: present
  loop: "{{ global_groups | dict2items }}"
  when:
    - (item.value.state | default('present')) == 'present'
    - item.key not in skip_groups

```

---

<div class="post-metadata">

**Author:** ![flowerysong](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/flowerysong/32/2305_2.png) [@flowerysong](https://forum.ansible.com/u/flowerysong)\
**Post date:** [September 23, 2025, 5:35am UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/25 "2025-09-23T05:35:33Z")

</div>

Let’s take your latest “bug report” step by step, since you either refuse to read the previous explanations or are incapable of asking questions about the parts that confuse you.

You were told to use:

```yaml
gid: "{{ item.value.gid }}"

```

You instead used:

```yaml
gid: "{{ item.gid }}"

```

then tried to claim that the resulting error is a bug in Ansible. It’s not.

You have:

```yaml
global_groups:
  production_ansible:
    gid: 10001
  staging_ansible:
    gid: 20001
  grafana:
    gid: 10501
  prometheus:
    gid: 10502
  zookeeper:
    gid: 10503
  rundeck:
    gid: 10504
  nginx:
    gid: 10505
  gnupgserver:
    gid: 10506
  sequoia:
    gid: 10507

```

You want to loop over this, so you use `loop` with `dict2items`:

```auto
    - debug:
        msg: "{{ item }}"
      loop: "{{ global_groups | dict2items }}"

```

This outputs:

```console
TASK [debug] *******************************************************************
ok: [localhost] => (item={'key': 'production_ansible', 'value': {'gid': 10001}}) => {
    "msg": {
        "key": "production_ansible",
        "value": {
            "gid": 10001
        }
    }
}
ok: [localhost] => (item={'key': 'staging_ansible', 'value': {'gid': 20001}}) => {
    "msg": {
        "key": "staging_ansible",
        "value": {
            "gid": 20001
        }
    }
}
ok: [localhost] => (item={'key': 'grafana', 'value': {'gid': 10501}}) => {
    "msg": {
        "key": "grafana",
        "value": {
            "gid": 10501
        }
    }
}
ok: [localhost] => (item={'key': 'prometheus', 'value': {'gid': 10502}}) => {
    "msg": {
        "key": "prometheus",
        "value": {
            "gid": 10502
        }
    }
}
ok: [localhost] => (item={'key': 'zookeeper', 'value': {'gid': 10503}}) => {
    "msg": {
        "key": "zookeeper",
        "value": {
            "gid": 10503
        }
    }
}
ok: [localhost] => (item={'key': 'rundeck', 'value': {'gid': 10504}}) => {
    "msg": {
        "key": "rundeck",
        "value": {
            "gid": 10504
        }
    }
}
ok: [localhost] => (item={'key': 'nginx', 'value': {'gid': 10505}}) => {
    "msg": {
        "key": "nginx",
        "value": {
            "gid": 10505
        }
    }
}
ok: [localhost] => (item={'key': 'gnupgserver', 'value': {'gid': 10506}}) => {
    "msg": {
        "key": "gnupgserver",
        "value": {
            "gid": 10506
        }
    }
}
ok: [localhost] => (item={'key': 'sequoia', 'value': {'gid': 10507}}) => {
    "msg": {
        "key": "sequoia",
        "value": {
            "gid": 10507
        }
    }
}

```

You can clearly see that these items do not have `gid` as a top-level key, so it’s expected that templating `{{ item.gid }}` will result in an error.

```yaml
    - debug:
        msg: "{{ item.gid }}"
      loop: "{{ global_groups | dict2items }}"

```

```console
TASK [debug] *******************************************************************
[ERROR]: Task failed: Finalization of task args for 'ansible.builtin.debug' failed: Error while resolving value for 'msg': object of type 'dict' has no attribute 'gid'

```

They **do** have a top-level `value` key that contains `gid`, so accessing it the way you were told to [five days ago](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/2) will work.

```yaml
    - debug:
        msg: "{{ item.value.gid }}"
      loop: "{{ global_groups | dict2items }}"

```

```console
TASK [debug] *******************************************************************
ok: [localhost] => (item={'key': 'production_ansible', 'value': {'gid': 10001}}) => {
    "msg": 10001
}
ok: [localhost] => (item={'key': 'staging_ansible', 'value': {'gid': 20001}}) => {
    "msg": 20001
}
ok: [localhost] => (item={'key': 'grafana', 'value': {'gid': 10501}}) => {
    "msg": 10501
}
ok: [localhost] => (item={'key': 'prometheus', 'value': {'gid': 10502}}) => {
    "msg": 10502
}
ok: [localhost] => (item={'key': 'zookeeper', 'value': {'gid': 10503}}) => {
    "msg": 10503
}
ok: [localhost] => (item={'key': 'rundeck', 'value': {'gid': 10504}}) => {
    "msg": 10504
}
ok: [localhost] => (item={'key': 'nginx', 'value': {'gid': 10505}}) => {
    "msg": 10505
}
ok: [localhost] => (item={'key': 'gnupgserver', 'value': {'gid': 10506}}) => {
    "msg": 10506
}
ok: [localhost] => (item={'key': 'sequoia', 'value': {'gid': 10507}}) => {
    "msg": 10507
}

```

Now please, stop wasting your time and use the working code that you were given instead of clinging to the broken code that you already know doesn’t work.

---

<div class="post-metadata">

**Author:** ![anon81884396](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anon81884396](https://forum.ansible.com/u/anon81884396)\
**Post date:** [September 23, 2025, 12:19pm UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/26 "2025-09-23T12:19:24Z")

</div>

TFW you’ve filed your seventeeth bug report for your invalid code that doesn’t work to suddenly start working and people keep asking you to read what they write

 ![image](https://us1.discourse-cdn.com/ansible/original/2X/c/c45d19fc89318efd721cb60682a001e0de26ff7e.jpeg)

---

<div class="post-metadata">

**Author:** ![Gittes](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@Gittes](https://forum.ansible.com/u/Gittes)\
**Post date:** [September 23, 2025, 9:06pm UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/27 "2025-09-23T21:06:44Z")

</div>

The syntax is correct!

How do I debug and trace it to a package in python and/or ansible please?

I’ve been trying to figure this out forever!

---

<div class="post-metadata">

**Author:** ![Gittes](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@Gittes](https://forum.ansible.com/u/Gittes)\
**Post date:** [September 23, 2025, 9:38pm UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/28 "2025-09-23T21:38:36Z")

</div>

I made a python virtual environment for python and I still get the same error!

How do I isolate it further please?

---

<div class="post-metadata">

**Author:** ![flowerysong](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/flowerysong/32/2305_2.png) [@flowerysong](https://forum.ansible.com/u/flowerysong)\
**Post date:** [September 23, 2025, 10:47pm UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/29 "2025-09-23T22:47:13Z")

</div>

The error is not related to your environment. It is a result of running invalid code. You have been told how to fix your code multiple times, and I am now done trying to help you.

---

<div class="post-metadata">

**Author:** ![utoddl](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/utoddl/32/249_2.png) [@utoddl](https://forum.ansible.com/u/utoddl)\
**Post date:** [September 23, 2025, 11:36pm UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/30 "2025-09-23T23:36:29Z")

</div>

> [@Gittes](#):
>
> The syntax is correct!

No, it is not correct. Below, I’ve commented out the broken lines of your code, and inserted the correct lines below each of them.

```yaml
- name: user management set global groups macOS
  tags:
    - user_mgmt
    - admin_accounts
  group:
    name: "{{ item.key }}"
  # gid: "{{ item.gid }}" # Broken: "item" has no "gid" at the top level.
    gid: "{{ item.value.gid }}" # Fixed!
  # state: "{{ item.state | default('present') }}" # Broken: if "state" exists,
  # it would be inside the "item.value" dict.
    state: "{{ item.value.state | default('present') }}"
  loop: "{{ test_global_groups | dict2items }}"
  when:
  # - (test_global_groups[item].state|default('present')) == 'present' # Broken:
  # "item" is a dict, not a string that you can use as an index into "test_global_groups".
    - (test_global_groups[item.key].state | default('present')) == 'present'
  # - item not in skip_groups # Broken: "item" is a dict. It will never be "in skip_groups".
    - item.key not in skip_groups # Maybe fixed: is "skip_groups" a list?

```

You must fix all four of these problems or your task will continue to fail.

_[Technically, the syntax is “correct”. It’s that the expressions are invalid; they don’t match the structure of the data, and therefore the task won’t run as it is.]_

Please do ask any questions you still have, and post whatever YAML inputs and resulting errors that aren’t clear to you. But repeatedly posting that there’s nothing wrong with your code when experienced users have repeatedly said otherwise has cost you many unproductive days, so you may want to reconsider that strategy; it hasn’t worked yet.

---

<div class="post-metadata">

**Author:** ![anon81884396](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@anon81884396](https://forum.ansible.com/u/anon81884396)\
**Post date:** [September 24, 2025, 1:07am UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/31 "2025-09-24T01:07:53Z")

</div>

Buddy, don’t keep opening issues about this in the homebrew github repository either. [Issue with ansible-playbook with loops! Playbook and role say · Issue #245465 · Homebrew/homebrew-core · GitHub](https://github.com/Homebrew/homebrew-core/issues/245465) this isn’t a problem with homebrew or Ansible. Open source contributors and maintainers are already stretched very thin, they don’t need bogus issues like this gumming up legitimate issues. Just implement the code the two people here have given you.

---

<div class="post-metadata">

**Author:** ![Gittes](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@Gittes](https://forum.ansible.com/u/Gittes)\
**Post date:** [September 24, 2025, 2:19am UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/32 "2025-09-24T02:19:25Z")

</div>

Too bad!

I filed a bug again with Homebrew and Ansible:

> <https://github.com/ansible/ansible/issues/85908>
>
> \### Summary
> 
> ansible-playbook on macOS does not work with group module when loop…s are involved.
> 
> You keep closing my bugs! I've filed two bugs prior on the Ansible GitHub:
> https://github.com/ansible/ansible/issues/85884
> https://github.com/ansible/ansible/issues/85873
> 
> I've also just filed a bug with Homebrew:
> https://github.com/Homebrew/homebrew-core/issues/245465
> 
> Lastly, I started a topic on the Ansible forum:
> https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511
> 
> \### Issue Type
> 
> Bug Report
> 
> \### Component Name
> 
> ansible-core, ansible.builtin.group
> 
> \### Ansible Version
> 
> \`\`\`console
> $ ansible --version
> ansible \[core 2.19.2\]
> config file = /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg
> configured module search path = \['/Users/chris/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'\]
> ansible python module location = /opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible
> ansible collection location = /Users/chris/.ansible/collections:/usr/share/ansible/collections
> executable location = /opt/homebrew/bin/ansible
> python version = 3.13.7 (main, Aug 14 2025, 11:12:11) \[Clang 17.0.0 (clang-1700.0.13.3)\] (/opt/homebrew/Cellar/ansible/12.0.0/libexec/bin/python)
> jinja version = 3.1.6
> pyyaml version = 6.0.2 (with libyaml v0.2.5)
> \`\`\`
> 
> \### Configuration
> 
> \`\`\`console
> \# if using a version older than ansible-core 2.12 you should omit the '-t all'
> $ ansible-config dump --only-changed -t all
> ANSIBLE\_PIPELINING(/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg) = True
> CONFIG\_FILE() = /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg
> DEFAULT\_ROLES\_PATH(/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg) = \['/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles'\]
> DEFAULT\_VAULT\_PASSWORD\_FILE(/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg) = /opt/ChrisWasHere/.secrets/ansible\_vault\_password.txt
> EDITOR(env: EDITOR) = vim
> INTERPRETER\_PYTHON(/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg) = auto\_silent
> 
> GALAXY\_SERVERS:
> 
> 
> CONNECTION:
> ==========
> 
> local:
> \_\_\_\_\_
> pipelining(/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg) = True
> 
> psrp:
> \_\_\_\_
> pipelining(/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg) = True
> 
> ssh:
> \_\_\_
> pipelining(/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg) = True
> 
> winrm:
> \_\_\_\_\_
> pipelining(/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg) = True
> \`\`\`
> 
> \### OS / Environment
> 
> \`\`\`
> CAPSULE-V-001-MM037:~ chris$ sw\_vers 
> ProductName: macOS
> ProductVersion: 15.4
> BuildVersion: 24E248
> 
> Bare metal Mac mini host at MacStadium:
> Motd Updated : 2025/07/18 16:47:07
> Hostname : CAPSULE-V-001-MM037.local
> Privte IP Address : 10.210.106.47
> OS Info : ProductName: macOS
> ProductVersion: 15.4
> BuildVersion: 24E248
> Hardware Info : Model Identifier: Mac16,10
> Model Number: XXXXXXXXXXXX
> Chip: Apple M4
> Total Number of Cores: 10 (4 performance and 6 efficiency)
> Memory: 24 GB
> System Firmware Version: 11881.101.1
> OS Loader Version: 11881.101.1
> Provisioning UDID: XXXXXXXXXXXXXXXXXX
> Activation Lock Status: Disabled
> Disk Used/Total : 60G / 494G
> \`\`\`
> 
> \### Steps to Reproduce
> 
> 
> add\_groups.yml with loops:
> \`\`\`yaml (paste below)
> \---
> \# file: roles/common/tasks/add\_groups.yml
> \#
> \# Order of operation: rm\_users.yml -\> rm\_groups.yml -\> add\_groups.yml -\>
> \# add\_users.yml -\> set\_homedir\_perms.yml
> 
> \# - name: user management set global groups macOS
> \# tags:
> \# - user\_mgmt
> \# - admin\_accounts
> \# group:
> \# name: "{{ item }}"
> \# gid: "{{ custom\_groups\[item\].gid if custom\_groups\[item\] is defined else global\_groups\[item\].gid | mandatory }}"
> \# state: "{{ global\_groups\[item\].state | default('present') }}"
> \# with\_items: "{{ global\_groups }}"
> \# when:
> \# - (global\_groups\[item\].state|default('present')) == 'present'
> \# - item not in skip\_groups
> 
> - name: user management set global groups macOS
> tags:
> - user\_mgmt
> - admin\_accounts
> group:
> name: "{{ item }}"
> \# gid: "{{ custom\_groups\[item\].gid if custom\_groups\[item\] is defined else global\_groups\[item\].gid | mandatory }}"
> \# gid: "{{ global\_groups\[item\].gid }}"
> \# state: "{{ global\_groups\[item\].state | default('present') }}"
> gid: "{{ item.gid | mandatory }}"
> state: "{{ item.state | default('present') }}"
> \# with\_list: global\_groups
> loop: "{{ global\_groups | dict2items }}"
> when:
> - (global\_groups\[item\].state|default('present')) == 'present'
> - item not in skip\_groups
> 
> - name: user management set local groups macOS
> tags:
> - user\_mgmt
> group:
> name: "{{ item }}"
> gid: "{{ item.gid | mandatory }}"
> state: "{{ item.state | default('present') }}"
> with\_items: "{{ local\_groups }}"
> when: (global\_groups\[item\].state|default('present')) == 'present'
> 
> - name: user management set custom groups macOS
> tags:
> - user\_mgmt
> group:
> name: "{{ item | mandatory }}"
> gid: "{{ custom\_groups\[item\].gid | mandatory }}"
> state: "{{ custom\_groups\[item\].state | default('present') }}"
> with\_items: "{{ custom\_groups.keys() }}"
> when: custom\_groups is defined
> 
> \# vim:ft=ansible:
> \`\`\`
> 
> add\_groups.yml without loops:
> \`\`\`
> \---
> \# file: roles/common/tasks/add\_groups.yml
> \#
> \# Order of operation: rm\_users.yml -\> rm\_groups.yml -\> add\_groups.yml -\>
> \# add\_users.yml -\> set\_homedir\_perms.yml
> 
> \# - name: user management set global groups macOS
> \# tags:
> \# - user\_mgmt
> \# - admin\_accounts
> \# group:
> \# name: "{{ item }}"
> \# gid: "{{ custom\_groups\[item\].gid if custom\_groups\[item\] is defined else global\_groups\[item\].gid | mandatory }}"
> \# state: "{{ global\_groups\[item\].state | default('present') }}"
> \# with\_items: "{{ global\_groups }}"
> \# when:
> \# - (global\_groups\[item\].state|default('present')) == 'present'
> \# - item not in skip\_groups
> 
> \#- name: debug global\_groups
> \# debug:
> \# var: test\_global\_groups
> 
> \- name: user management set global groups macOS
> tags:
> - user\_mgmt
> - admin\_accounts
> - groups\_only
> group:
> name: production\_ansible
> gid: 10001
> state: present
> \# gid: "{{ item.gid }}"
> \# state: "{{ item.state | default('present') }}"
> \# loop: "{{ test\_global\_groups | dict2items }}"
> \# when:
> \# - (test\_global\_groups\[item\].state|default('present')) == 'present'
> \# - item not in skip\_groups
> \#- name: user management set global groups macOS
> \# tags:
> \# - user\_mgmt
> \# - admin\_accounts
> \# group:
> \# name: "{{ item.key }}"
> \# gid: "{{ item.gid }}"
> \# state: "{{ item.state | default('present') }}"
> \# loop: "{{ test\_global\_groups | dict2items }}"
> \# when:
> \# - (test\_global\_groups\[item\].state|default('present')) == 'present'
> \# - item not in skip\_groups
> 
> \#- name: user managment set local groups macOS
> \# tags:
> \# - user\_mgmt
> \# group:
> \# name: "{{ item }}"
> \# gid: "{{ item.gid | mandatory }}"
> \# state: "{{ item.state | default('present') }}"
> \# with\_items: "{{ local\_groups }}"
> \# when: (global\_groups\[item\].state|default('present')) == 'present'
> 
> \#- name: user managment set custom groups macOS
> \# tags:
> \# - user\_mgmt
> \# group:
> \# name: "{{ item }}"
> \# gid: "{{ custom\_groups\[item\].gid | mandatory }}"
> \# state: "{{ custom\_groups\[item\].state | default('present') }}"
> \# with\_items: "{{ custom\_groups.keys() }}"
> \# when: custom\_groups is defined
> \#
> ...
> \# vim:ft=ansible
> \`\`\`
> 
> group\_vars/all/group\_list:
> \`\`\`
> \---
> \# file: groups\_vars/all/group\_list \[0/1865\]
> \# desc: Dictionary of all groups, both global and local.
> \# Any group whose gid doesn't match the user's uid must be declared.
> \#
> \# Example:
> \# (key) dba:
> \# (required) gid: 10019
> \# (optional) state: present
> \#
> 
> global\_groups:
> production\_ansible:
> gid: 10001
> staging\_ansible:
> gid: 20001
> grafana:
> gid: 10501
> prometheus:
> gid: 10502
> zookeeper:
> gid: 10503
> rundeck:
> gid: 10504
> nginx:
> gid: 10505
> gnupgserver:
> gid: 10506
> sequoia:
> gid: 10507
> 
> \#group\_list:
> \# production\_ansible:
> \# gid: 10001
> \# staging\_ansible:
> \# gid: 20001
> \# grafana:
> \# gid: 10501
> \# prometheus:
> \# gid: 10502
> \# zookeeper:
> \# gid: 10503
> \# rundeck:
> \# gid: 10504
> \# nginx:
> \# gid: 10505
> 
> \## These lists should be declared under group\_vars or host\_vars. These empty lists
> \## are here for compatibility. 
> local\_groups: \[\]
> custom\_groups: {}
> local\_remove\_groups: \[\]
> local\_admin\_users: \[\]
> local\_service\_users: \[\]
> local\_remove\_users: \[\]
> custom\_service\_users: \[\]
> host\_local\_service\_users: \[\]
> 
> global\_remove\_groups:
> 
> \#local\_remove\_groups:
> 
> \#global\_groups:
> 
> \#local\_groups:
> 
> ...
> \# vim:ft=ansible
> \`\`\`
> 
> roles/common/vars/main.yml:
> \`\`\`
> \#SPDX-License-Identifier: MIT-0
> \---
> \# vars file for common
> 
> 001\_vault\_secrets\_file: inventory/{{ deployment\_enviroment }}/group\_files/all/001\_vault\_secrets.yml.gpg
> 
> test\_global\_groups:
> production\_ansible:
> gid: 10001
> staging\_ansible:
> gid: 20001
> grafana:
> gid: 10501
> prometheus:
> gid: 10502
> zookeeper:
> gid: 10503
> rundeck:
> gid: 10504
> nginx:
> gid: 10505
> gnupgserver:
> gid: 10506
> sequoia:
> gid: 10507
> 
> ...
> \# vim:ft=ansible
> \`\`\`
> 
> 
> \### Expected Results
> 
> Here's it work without loops!
> 
> \`\`\`
> ansible-playbook --inventory inventory/staging/staging playbooks/manage\_users\_and\_groups.yml --private-key ~/.ssh/staging\_ansible\_id\_ed25519 --user staging\_ansible --limit capsule-v-001-mm037 -vvvvv --skip-tags to\_skip &\> ~/Temporary/ansible-playbook.common\_role.with\_debugger\_no\_loops.txt
> \`\`\`
> 
> \[ansible-playbook.common\_role.with\_debugger\_no\_loops.txt\](https://github.com/user-attachments/files/22504269/ansible-playbook.common\_role.with\_debugger\_no\_loops.txt)
> 
> \### Actual Results
> 
> \`\`\`console
> Here's it failing with loops:
> 
> ansible-playbook --inventory inventory/staging/staging playbooks/manage\_users\_and\_groups.yml --private-key ~/.ssh/staging\_ansible\_id\_ed25519 --user staging\_ansible --limit capsule-v-001-mm037 -vvvvv --skip-tags to\_skip &\> ~/Temporary/ansible-playbook.common\_role.with\_debgger.output.txt
> 
> 
> Output of ansible-playbook.common\_role.with\_debgger.output.txt:
> 
> ansible-playbook \[core 2.19.2\]
> config file = /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg
> configured module search path = \['/Users/chris/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'\]
> ansible python module location = /opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible
> ansible collection location = /Users/chris/.ansible/collections:/usr/share/ansible/collections
> executable location = /opt/homebrew/bin/ansible-playbook
> python version = 3.13.7 (main, Aug 14 2025, 11:12:11) \[Clang 17.0.0 (clang-1700.0.13.3)\] (/opt/homebrew/Cellar/ansible/12.0.0/libexec/bin/python)
> jinja version = 3.1.6
> pyyaml version = 6.0.2 (with libyaml v0.2.5)
> Using /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/ansible.cfg as config file
> Reading vault password file: /opt/ChrisWasHere/.secrets/ansible\_vault\_password.txt
> setting up inventory plugins
> Loading collection ansible.builtin from 
> host\_list declined parsing /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/inventory/staging/staging as it did not pass its verify\_file() method
> script declined parsing /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/inventory/staging/staging as it did not pass its verify\_file() method
> auto declined parsing /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/inventory/staging/staging as it did not pass its verify\_file() method
> Parsed /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/inventory/staging/staging inventory source with yaml plugin
> Loading collection community.general from /opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible\_collections/community/general
> Loading callback plugin default of type stdout, v2.0 from /opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/plugins/callback/default.py
> Attempting to use 'junit' callback.
> Attempting to use 'minimal' callback.
> Skipping callback 'minimal', as we already have a stdout callback.
> Attempting to use 'oneline' callback.
> Skipping callback 'oneline', as we already have a stdout callback.
> Attempting to use 'tree' callback.
> 
> PLAYBOOK: manage\_users\_and\_groups.yml \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> Positional arguments: playbooks/manage\_users\_and\_groups.yml
> verbosity: 5
> private\_key\_file: /Users/chris/.ssh/staging\_ansible\_id\_ed25519
> remote\_user: staging\_ansible
> connection: ssh
> become\_method: sudo
> tags: ('all',)
> skip\_tags: ('to\_skip',)
> inventory: ('/Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/inventory/staging/staging',)
> subset: capsule-v-001-mm037
> forks: 5
> 1 plays in playbooks/manage\_users\_and\_groups.yml
> 
> PLAY \[All common roles\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> TASK \[Gathering Facts\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> task path: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/playbooks/manage\_users\_and\_groups.yml:4
> Including module\_utils file ansible/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_internal/\_ansiballz/\_loader.py
> Including module\_utils file ansible/module\_utils/\_internal/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_internal/\_ansiballz/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_internal/\_errors.py
> Including module\_utils file ansible/module\_utils/\_internal/\_json/\_profiles/\_module\_legacy\_c2m.py
> Including module\_utils file ansible/module\_utils/\_internal/\_json/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_internal/\_json/\_profiles/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_internal/\_datatag/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_internal/\_dataclass\_validation.py
> Including module\_utils file ansible/module\_utils/\_internal/\_datatag/\_tags.py
> Including module\_utils file ansible/module\_utils/\_internal/\_json/\_profiles/\_module\_legacy\_m2c.py
> Including module\_utils file ansible/module\_utils/\_internal/\_messages.py
> Including module\_utils file ansible/module\_utils/\_internal/\_patches/\_socket\_patch.py
> Including module\_utils file ansible/module\_utils/\_internal/\_patches/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_internal/\_patches/\_sys\_intern\_patch.py
> Including module\_utils file ansible/module\_utils/\_internal/\_traceback.py
> Including module\_utils file ansible/module\_utils/\_internal/\_stack.py
> Including module\_utils file ansible/module\_utils/basic.py
> Including module\_utils file ansible/module\_utils/\_internal/\_debugging.py
> Including module\_utils file ansible/module\_utils/\_internal/\_deprecator.py
> Including module\_utils file ansible/module\_utils/\_internal/\_plugin\_info.py
> Including module\_utils file ansible/module\_utils/\_internal/\_validation.py
> Including module\_utils file ansible/module\_utils/common/\_utils.py
> Including module\_utils file ansible/module\_utils/common/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/common/arg\_spec.py
> Including module\_utils file ansible/module\_utils/common/file.py
> Including module\_utils file ansible/module\_utils/common/json.py
> Including module\_utils file ansible/module\_utils/\_internal/\_json/\_legacy\_encoder.py
> Including module\_utils file ansible/module\_utils/\_internal/\_json/\_profiles/\_tagless.py
> Including module\_utils file ansible/module\_utils/common/locale.py
> Including module\_utils file ansible/module\_utils/common/parameters.py
> Including module\_utils file ansible/module\_utils/common/collections.py
> Including module\_utils file ansible/module\_utils/common/process.py
> Including module\_utils file ansible/module\_utils/common/sys\_info.py
> Including module\_utils file ansible/module\_utils/common/text/converters.py
> Including module\_utils file ansible/module\_utils/common/text/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/common/text/formatters.py
> Including module\_utils file ansible/module\_utils/common/validation.py
> Including module\_utils file ansible/module\_utils/common/warnings.py
> Including module\_utils file ansible/module\_utils/\_internal/\_event\_utils.py
> Including module\_utils file ansible/module\_utils/\_internal/\_text\_utils.py
> Including module\_utils file ansible/module\_utils/compat/selinux.py
> Including module\_utils file ansible/module\_utils/compat/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/compat/typing.py
> Including module\_utils file ansible/module\_utils/\_internal/\_patches/\_dataclass\_annotation\_patch.py
> Including module\_utils file ansible/module\_utils/datatag.py
> Including module\_utils file ansible/module\_utils/distro/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/distro/\_distro.py
> Including module\_utils file ansible/module\_utils/errors.py
> Including module\_utils file ansible/module\_utils/facts/ansible\_collector.py
> Including module\_utils file ansible/module\_utils/facts/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/facts/collector.py
> Including module\_utils file ansible/module\_utils/facts/compat.py
> Including module\_utils file ansible/module\_utils/facts/default\_collectors.py
> Including module\_utils file ansible/module\_utils/facts/hardware/aix.py
> Including module\_utils file ansible/module\_utils/facts/hardware/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/facts/hardware/base.py
> Including module\_utils file ansible/module\_utils/facts/hardware/darwin.py
> Including module\_utils file ansible/module\_utils/facts/hardware/dragonfly.py
> Including module\_utils file ansible/module\_utils/facts/hardware/freebsd.py
> Including module\_utils file ansible/module\_utils/facts/hardware/hpux.py
> Including module\_utils file ansible/module\_utils/facts/hardware/hurd.py
> Including module\_utils file ansible/module\_utils/facts/hardware/linux.py
> Including module\_utils file ansible/module\_utils/\_internal/\_concurrent/\_futures.py
> Including module\_utils file ansible/module\_utils/\_internal/\_concurrent/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/\_internal/\_concurrent/\_daemon\_threading.py
> Including module\_utils file ansible/module\_utils/facts/hardware/netbsd.py
> Including module\_utils file ansible/module\_utils/facts/hardware/openbsd.py
> Including module\_utils file ansible/module\_utils/facts/hardware/sunos.py
> Including module\_utils file ansible/module\_utils/facts/namespace.py
> Including module\_utils file ansible/module\_utils/facts/network/aix.py
> Including module\_utils file ansible/module\_utils/facts/network/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/facts/network/base.py
> Including module\_utils file ansible/module\_utils/facts/network/darwin.py
> Including module\_utils file ansible/module\_utils/facts/network/dragonfly.py
> Including module\_utils file ansible/module\_utils/facts/network/fc\_wwn.py
> Including module\_utils file ansible/module\_utils/facts/network/freebsd.py
> Including module\_utils file ansible/module\_utils/facts/network/generic\_bsd.py
> Including module\_utils file ansible/module\_utils/facts/network/hpux.py
> Including module\_utils file ansible/module\_utils/facts/network/hurd.py
> Including module\_utils file ansible/module\_utils/facts/network/iscsi.py
> Including module\_utils file ansible/module\_utils/facts/network/linux.py
> Including module\_utils file ansible/module\_utils/facts/network/netbsd.py
> Including module\_utils file ansible/module\_utils/facts/network/nvme.py
> Including module\_utils file ansible/module\_utils/facts/network/openbsd.py
> Including module\_utils file ansible/module\_utils/facts/network/sunos.py
> Including module\_utils file ansible/module\_utils/facts/other/facter.py
> Including module\_utils file ansible/module\_utils/facts/other/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/facts/other/ohai.py
> Including module\_utils file ansible/module\_utils/facts/sysctl.py
> Including module\_utils file ansible/module\_utils/facts/system/apparmor.py
> Including module\_utils file ansible/module\_utils/facts/system/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/facts/system/caps.py
> Including module\_utils file ansible/module\_utils/facts/system/chroot.py
> Including module\_utils file ansible/module\_utils/facts/system/cmdline.py
> Including module\_utils file ansible/module\_utils/facts/system/date\_time.py
> Including module\_utils file ansible/module\_utils/facts/system/distribution.py
> Including module\_utils file ansible/module\_utils/facts/system/dns.py
> Including module\_utils file ansible/module\_utils/facts/system/env.py
> Including module\_utils file ansible/module\_utils/facts/system/fips.py
> Including module\_utils file ansible/module\_utils/facts/system/loadavg.py
> Including module\_utils file ansible/module\_utils/facts/system/local.py
> Including module\_utils file ansible/module\_utils/facts/system/lsb.py
> Including module\_utils file ansible/module\_utils/facts/system/pkg\_mgr.py
> Including module\_utils file ansible/module\_utils/facts/system/platform.py
> Including module\_utils file ansible/module\_utils/facts/system/python.py
> Including module\_utils file ansible/module\_utils/facts/system/selinux.py
> Including module\_utils file ansible/module\_utils/facts/system/service\_mgr.py
> Including module\_utils file ansible/module\_utils/compat/version.py
> Including module\_utils file ansible/module\_utils/facts/system/ssh\_pub\_keys.py
> Including module\_utils file ansible/module\_utils/facts/system/systemd.py
> Including module\_utils file ansible/module\_utils/facts/system/user.py
> Including module\_utils file ansible/module\_utils/facts/timeout.py
> Including module\_utils file ansible/module\_utils/facts/utils.py
> Including module\_utils file ansible/module\_utils/facts/virtual/base.py
> Including module\_utils file ansible/module\_utils/facts/virtual/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/facts/virtual/dragonfly.py
> Including module\_utils file ansible/module\_utils/facts/virtual/freebsd.py
> Including module\_utils file ansible/module\_utils/facts/virtual/hpux.py
> Including module\_utils file ansible/module\_utils/facts/virtual/linux.py
> Including module\_utils file ansible/module\_utils/facts/virtual/netbsd.py
> Including module\_utils file ansible/module\_utils/facts/virtual/openbsd.py
> Including module\_utils file ansible/module\_utils/facts/virtual/sunos.py
> Including module\_utils file ansible/module\_utils/facts/virtual/sysctl.py
> Including module\_utils file ansible/module\_utils/parsing/convert\_bool.py
> Including module\_utils file ansible/module\_utils/parsing/\_\_init\_\_.py
> Including module\_utils file ansible/module\_utils/six/\_\_init\_\_.py
> \<capsule-v-001-mm037\> Attempting python interpreter discovery.
> \<10.210.106.47\> ESTABLISH SSH CONNECTION FOR USER: staging\_ansible
> \<10.210.106.47\> SSH: ansible.cfg set ssh\_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
> \<10.210.106.47\> SSH: ANSIBLE\_PRIVATE\_KEY\_FILE/private\_key\_file/ansible\_ssh\_private\_key\_file set: (-o)(IdentityFile="/Users/chris/.ssh/staging\_ansible\_id\_ed25519")
> \<10.210.106.47\> SSH: ansible\_password/ansible\_ssh\_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
> \<10.210.106.47\> SSH: ANSIBLE\_REMOTE\_USER/remote\_user/ansible\_user/user/-u set: (-o)(User="staging\_ansible")
> \<10.210.106.47\> SSH: ANSIBLE\_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
> \<10.210.106.47\> SSH: Set ssh\_common\_args: ()
> \<10.210.106.47\> SSH: Set ssh\_extra\_args: ()
> \<10.210.106.47\> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath="/Users/chris/.ansible/cp/2e613f8131")
> \<10.210.106.47\> SSH: Restrict number of password prompts in case incorrect password is provided.: (-o)(NumberOfPasswordPrompts=1)
> \<10.210.106.47\> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/Users/chris/.ssh/staging\_ansible\_id\_ed25519"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="staging\_ansible"' -o ConnectTimeout=10 -o 'ControlPath="/Users/chris/.ansible/cp/2e613f8131"' -o NumberOfPasswordPrompts=1 10.210.106.47 '/bin/sh -c '"'"'echo FOUND; command -v '"'"'"'"'"'"'"'"'python3.13'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.12'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.11'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.10'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.9'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.8'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'/usr/bin/python3'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3'"'"'"'"'"'"'"'"'; echo ENDFOUND && sleep 0'"'"''
> \<10.210.106.47\> (0, b'FOUND\\n/usr/bin/python3\\n/usr/bin/python3\\nENDFOUND\\n', b'')
> Using module file /opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/modules/setup.py
> Pipelining is enabled.
> \<10.210.106.47\> ESTABLISH SSH CONNECTION FOR USER: staging\_ansible
> \<10.210.106.47\> SSH: ansible.cfg set ssh\_args: (-C)(-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
> \<10.210.106.47\> SSH: ANSIBLE\_PRIVATE\_KEY\_FILE/private\_key\_file/ansible\_ssh\_private\_key\_file set: (-o)(IdentityFile="/Users/chris/.ssh/staging\_ansible\_id\_ed25519")
> \<10.210.106.47\> SSH: ansible\_password/ansible\_ssh\_password not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
> \<10.210.106.47\> SSH: ANSIBLE\_REMOTE\_USER/remote\_user/ansible\_user/user/-u set: (-o)(User="staging\_ansible")
> \<10.210.106.47\> SSH: ANSIBLE\_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
> \<10.210.106.47\> SSH: Set ssh\_common\_args: ()
> \<10.210.106.47\> SSH: Set ssh\_extra\_args: ()
> \<10.210.106.47\> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath="/Users/chris/.ansible/cp/2e613f8131")
> \<10.210.106.47\> SSH: Restrict number of password prompts in case incorrect password is provided.: (-o)(NumberOfPasswordPrompts=1)
> \<10.210.106.47\> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o 'IdentityFile="/Users/chris/.ssh/staging\_ansible\_id\_ed25519"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="staging\_ansible"' -o ConnectTimeout=10 -o 'ControlPath="/Users/chris/.ansible/cp/2e613f8131"' -o NumberOfPasswordPrompts=1 10.210.106.47 '/bin/sh -c '"'"'sudo --non-interactive -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-bhiouucrbnnkwcjekhgxhoysifovmsyl ; /usr/bin/python3'"'"'"'"'"'"'"'"' && sleep 0'"'"''
> \<10.210.106.47\> Escalation succeeded
> \<10.210.106.47\> (0, b'\\n{"ansible\_facts": {"ansible\_env": {"TERM": "unknown", "SHELL": "/bin/zsh", "USER": "root", "SUDO\_USER": "staging\_ansible", "SUDO\_UID": "20001", "MAIL": "/var/mail/root", "PATH": "/usr/bin:/bin:/usr/sbin:/sbin", "PWD": "/private/var/home/staging\_ansible", "SHLVL": "1", "SUDO\_COMMAND": "/bin/sh -c echo BECOME-SUCCESS-bhiouucrbnnkwcjekhgxhoysifovmsyl ; /usr/bin/python3", "HOME": "/var/home/staging\_ansible", "LOGNAME": "root", "SUDO\_GID": "20001", "\_": "/usr/bin/python3", "\_\_CF\_USER\_TEXT\_ENCODING": "0x0:0:0", "SDKROOT": "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk", "CPATH": "/usr/local/include", "LIBRARY\_PATH": "/usr/local/lib", "MANPATH": "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/share/man:/Library/Developer/CommandLineTools/usr/share/man:/Library/Developer/CommandLineTools/Toolchains/XcodeDefault.xctoolchain/usr/share/man:", "LC\_CTYPE": "C.UTF-8"}, "ansible\_is\_chroot": false, "ansible\_system": "Darwin", "ansible\_kernel": "24.4.0", "ansible\_kernel\_version": "Darwin Kernel Version 24.4.0: Wed Mar 19 21:11:02 PDT 2025; root:xnu-11417.101.15~1/RELEASE\_ARM64\_T8132", "ansible\_machine": "arm64", "ansible\_python\_version": "3.9.6", "ansible\_fqdn": "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa", "ansible\_hostname": "CAPSULE-V-001-MM037", "ansible\_nodename": "CAPSULE-V-001-MM037.local", "ansible\_domain": "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa", "ansible\_userspace\_bits": "64", "ansible\_architecture": "arm64", "ansible\_model": "Mac16,10", "ansible\_product\_name": "Mac16,10", "ansible\_osversion": "24E248", "ansible\_osrevision": "199506", "ansible\_processor": "Apple M4", "ansible\_processor\_cores": "10", "ansible\_processor\_vcpus": "10", "ansible\_memtotal\_mb": 24576, "ansible\_memfree\_mb": 3627, "ansible\_uptime\_seconds": 1507979, "ansible\_lsb": {}, "ansible\_distribution": "MacOSX", "ansible\_distribution\_release": "24.4.0", "ansible\_distribution\_version": "15.4", "ansible\_distribution\_major\_version": "15", "ansible\_os\_family": "Darwin", "ansible\_interfaces": \["anpi0", "anpi1", "anpi3", "ap1", "awdl0", "bridge0", "en0", "en1", "en2", "en3", "en4", "en5", "en6", "en7", "gif0", "llw0", "lo0", "stf0", "utun0", "utun1", "utun2", "utun3"\], "ansible\_lo0": {"device": "lo0", "ipv4": \[{"address": "127.0.0.1", "netmask": "255.0.0.0", "network": "127.0.0.0", "broadcast": "127.255.255.255"}\], "ipv6": \[{"address": "::1", "prefix": "128"}, {"address": "fe80::1%lo0", "prefix": "64", "scope": "0x1"}\], "type": "loopback", "flags": \["UP", "LOOPBACK", "RUNNING", "MULTICAST"\], "macaddress": "unknown", "mtu": "16384", "options": \["PERFORMNUD", "DAD"\]}, "ansible\_gif0": {"device": "gif0", "ipv4": \[\], "ipv6": \[\], "type": "unknown", "flags": \["POINTOPOINT", "MULTICAST"\], "macaddress": "unknown", "mtu": "1280"}, "ansible\_stf0": {"device": "stf0", "ipv4": \[\], "ipv6": \[\], "type": "unknown", "flags": \[\], "macaddress": "unknown", "mtu": "1280"}, "ansible\_anpi1": {"device": "anpi1", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "7e:ed:2e:b3:ac:2f", "mtu": "1500", "options": \["CHANNEL\_IO"\], "media": "Unknown", "media\_select": "none", "status": "inactive"}, "ansible\_anpi3": {"device": "anpi3", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "7e:ed:2e:b3:ac:31", "mtu": "1500", "options": \["CHANNEL\_IO"\], "media": "Unknown", "media\_select": "none", "status": "inactive"}, "ansible\_anpi0": {"device": "anpi0", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "7e:ed:2e:b3:ac:2e", "mtu": "1500", "options": \["CHANNEL\_IO"\], "media": "Unknown", "media\_select": "none", "status": "inactive"}, "ansible\_en5": {"device": "en5", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "7e:ed:2e:b3:ac:0e", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "none", "status": "inactive"}, "ansible\_en6": {"device": "en6", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "7e:ed:2e:b3:ac:0f", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "none", "status": "inactive"}, "ansible\_en7": {"device": "en7", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "7e:ed:2e:b3:ac:11", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "none", "status": "inactive"}, "ansible\_en2": {"device": "en2", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "PROMISC", "SIMPLEX", "MULTICAST"\], "macaddress": "36:bf:f5:38:f8:80", "mtu": "1500", "options": \["TSO4", "TSO6", "CHANNEL\_IO"\], "media": "Unknown", "media\_select": "autoselect", "media\_type": "full-duplex", "status": "inactive"}, "ansible\_en3": {"device": "en3", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "PROMISC", "SIMPLEX", "MULTICAST"\], "macaddress": "36:bf:f5:38:f8:84", "mtu": "1500", "options": \["TSO4", "TSO6", "CHANNEL\_IO"\], "media": "Unknown", "media\_select": "autoselect", "media\_type": "full-duplex", "status": "inactive"}, "ansible\_en4": {"device": "en4", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "PROMISC", "SIMPLEX", "MULTICAST"\], "macaddress": "36:bf:f5:38:f8:8c", "mtu": "1500", "options": \["TSO4", "TSO6", "CHANNEL\_IO"\], "media": "Unknown", "media\_select": "autoselect", "media\_type": "full-duplex", "status": "inactive"}, "ansible\_ap1": {"device": "ap1", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "3e:a1:09:7e:dc:98", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "autoselect", "media\_type": "none", "status": "inactive"}, "ansible\_en1": {"device": "en1", "ipv4": \[\], "ipv6": \[{"address": "fe80::1848:57fd:ab6f:f72b%en1", "prefix": "64"}\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "46:20:95:8d:3c:c1", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "autoselect", "media\_type": "none"}, "ansible\_awdl0": {"device": "awdl0", "ipv4": \[\], "ipv6": \[{"address": "fe80::bce1:38ff:fefd:a346%awdl0", "prefix": "64", "scope": "0xf"}\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "be:e1:38:fd:a3:46", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "autoselect", "status": "active"}, "ansible\_llw0": {"device": "llw0", "ipv4": \[\], "ipv6": \[{"address": "fe80::bce1:38ff:fefd:a346%llw0", "prefix": "64", "scope": "0x10"}\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "be:e1:38:fd:a3:46", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "autoselect", "media\_type": "none"}, "ansible\_en0": {"device": "en0", "ipv4": \[{"address": "10.210.106.47", "netmask": "255.255.255.0", "network": "10.210.106.0", "broadcast": "10.210.106.255"}\], "ipv6": \[{"address": "fe80::74:1680:3411:1cc1%en0", "prefix": "64"}\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "d0:11:e5:b1:a3:22", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "autoselect", "media\_type": "10Gbase-", "media\_options": \["full-duplex"\], "status": "active"}, "ansible\_bridge0": {"device": "bridge0", "ipv4": \[\], "ipv6": \[\], "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "36:bf:f5:38:f8:80", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "Unknown", "media\_type": "unknown type", "status": "inactive"}, "ansible\_utun0": {"device": "utun0", "ipv4": \[\], "ipv6": \[{"address": "fe80::76bd:b46e:783d:5c38%utun0", "prefix": "64", "scope": "0x13"}\], "type": "unknown", "flags": \["UP", "POINTOPOINT", "RUNNING", "MULTICAST"\], "macaddress": "unknown", "mtu": "1380", "options": \["PERFORMNUD", "DAD"\]}, "ansible\_utun1": {"device": "utun1", "ipv4": \[\], "ipv6": \[{"address": "fe80::fee4:e473:d665:f5e%utun1", "prefix": "64", "scope": "0x14"}\], "type": "unknown", "flags": \["UP", "POINTOPOINT", "RUNNING", "MULTICAST"\], "macaddress": "unknown", "mtu": "2000", "options": \["PERFORMNUD", "DAD"\]}, "ansible\_utun2": {"device": "utun2", "ipv4": \[\], "ipv6": \[{"address": "fe80::ce81:b1c:bd2c:69e%utun2", "prefix": "64", "scope": "0x15"}\], "type": "unknown", "flags": \["UP", "POINTOPOINT", "RUNNING", "MULTICAST"\], "macaddress": "unknown", "mtu": "1000", "options": \["PERFORMNUD", "DAD"\]}, "ansible\_utun3": {"device": "utun3", "ipv4": \[\], "ipv6": \[{"address": "fe80::bcaa:8fad:d071:320e%utun3", "prefix": "64", "scope": "0x16"}\], "type": "unknown", "flags": \["UP", "POINTOPOINT", "RUNNING", "MULTICAST"\], "macaddress": "unknown", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\]}, "ansible\_default\_ipv4": {"gateway": "10.210.106.1", "interface": "en0", "device": "en0", "type": "ether", "flags": \["UP", "BROADCAST", "SMART", "RUNNING", "SIMPLEX", "MULTICAST"\], "macaddress": "d0:11:e5:b1:a3:22", "mtu": "1500", "options": \["PERFORMNUD", "DAD"\], "media": "Unknown", "media\_select": "autoselect", "media\_type": "10Gbase-", "media\_options": \["full-duplex"\], "status": "active", "address": "10.210.106.47", "netmask": "255.255.255.0", "network": "10.210.106.0", "broadcast": "10.210.106.255"}, "ansible\_default\_ipv6": {}, "ansible\_all\_ipv4\_addresses": \["10.210.106.47"\], "ansible\_all\_ipv6\_addresses": \["fe80::1848:57fd:ab6f:f72b%en1", "fe80::bce1:38ff:fefd:a346%awdl0", "fe80::bce1:38ff:fefd:a346%llw0", "fe80::74:1680:3411:1cc1%en0", "fe80::76bd:b46e:783d:5c38%utun0", "fe80::fee4:e473:d665:f5e%utun1", "fe80::ce81:b1c:bd2c:69e%utun2", "fe80::bcaa:8fad:d071:320e%utun3"\], "ansible\_ssh\_host\_key\_dsa\_public": "AAAAB3NzaC1kc3MAAACBAPur8QlyLLw+6UKYFu7aTlQ21IgbU89jBX7LAJ7FenNLe/weXo9xHKF7oG8kSSjoOzQNlnPScMLlre29HlWKNd8IjD+SzjVwzF3vVto8O65BYhrYT0vam1Ts56UoEhgIr+51B55OKGoHdzsgQGkQYUwrIsRboW1MJGToqdQlUBtbAAAAFQDw4z9gagusRN1pPkqUsvn49P8vIwAAAIEA6eiytuZ6SOym1L1EGjKM/YRiFD5wPaj/uKnMJn+QT1ctlU2U+V2pD4lclDThbK1Utvf6c/h0Id2l59K8vk3FwexSyBaFHr+/JILRVPcRX9XxPVih0OjbrY8EHSiPtz6IQ8IVbFYOMSfqzq+wD6VHMCyrpVqU4FodBRNbShghFIgAAACBAIGpnSzbUSl3YLygIXkTsk8orSXwSAB74vZImlbqbrVmDZpycdQJ2Q82GaOCQaW+YCRUI9jd9/40FJPuee8GOU3bGYzBDruWTi9XGlCtuIHP1sSc7XZUSw3bCGes/W406SLNkSll469LNqo2ZaPY0WLyrD3GpIsJK6F1jht/MKs6", "ansible\_ssh\_host\_key\_dsa\_public\_keytype": "ssh-dss", "ansible\_ssh\_host\_key\_rsa\_public": "AAAAB3NzaC1yc2EAAAADAQABAAABgQDMb0Gz3tmMIjfXrOWhPas1Gehsg28RzBlg21l0eAsJfxp+VAh9O6uVWWG7O7kW8goyOiid/OSyujh+Nu/oxba5wFbEYbTU/9ncBKTdlx/KGZjztoO2TcXzuYXnCActCCOsdS1zMP783rZXJnPDsHaqrBs9BM4Ke6ok/3a1lVXBp2UIPB/RX0JEiE5+/ouPVIDiEJnKZ9KWx0PT56Hn3T7vyFO1wPtq37B2B/75iDDslGObtH5ENcKRpAAj+FvMq59UEex+LiaurTPtSLB1bQfksRAkv2VCMyr1GM2Wku0j8K1eNG/mhgTDdzNYN3wLXIo/b+jDEcNQulascpxxzjDgdWZa5mOigz0S64XBwuR28AgfyO+dsyWDWn2JbExcHKzgL7/Dd1E5jVRiQrgC/dWz+eUuXYAaSSC4sKrjPSP20wBjQYmziNm6d7vBwvyf7y9em+WkJADhKubEKIx+1s9pbEqGwKq8U9QxL+79ENWawCiCal5QDPUR8T1wRoWfn8M=", "ansible\_ssh\_host\_key\_rsa\_public\_keytype": "ssh-rsa", "ansible\_ssh\_host\_key\_ecdsa\_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBC6MMFJ3osh8+vAnn6iFNYxc8CRVWZlgs+LoET7fc0nFC9zYc3xjmiMvmQbMX78mSBW6hD0FsyLYFw1weBXKTzE=", "ansible\_ssh\_host\_key\_ecdsa\_public\_keytype": "ecdsa-sha2-nistp256", "ansible\_ssh\_host\_key\_ed25519\_public": "AAAAC3NzaC1lZDI1NTE5AAAAIL41X5HM1EUb+ak8y0/8yANS3CcPZtbCY7AehiqjnB/R", "ansible\_ssh\_host\_key\_ed25519\_public\_keytype": "ssh-ed25519", "ansible\_dns": {"nameservers": \["8.8.8.8"\]}, "ansible\_user\_id": "root", "ansible\_user\_uid": 0, "ansible\_user\_gid": 0, "ansible\_user\_gecos": "System Administrator", "ansible\_user\_dir": "/var/root", "ansible\_user\_shell": "/bin/zsh", "ansible\_real\_user\_id": 0, "ansible\_effective\_user\_id": 0, "ansible\_real\_group\_id": 0, "ansible\_effective\_group\_id": 0, "ansible\_iscsi\_iqn": "", "ansible\_selinux": {"status": "Missing selinux Python library"}, "ansible\_selinux\_python\_present": false, "ansible\_hostnqn": "", "ansible\_fips": false, "ansible\_loadavg": {"1m": 2.576171875, "5m": 2.31689453125, "15m": 2.0439453125}, "ansible\_virtualization\_type": "", "ansible\_virtualization\_role": "", "ansible\_virtualization\_tech\_guest": \[\], "ansible\_virtualization\_tech\_host": \[\], "ansible\_system\_capabilities\_enforced": "N/A", "ansible\_system\_capabilities": "N/A", "ansible\_apparmor": {"status": "disabled"}, "ansible\_date\_time": {"year": "2025", "month": "09", "weekday": "Monday", "weekday\_number": "1", "weeknumber": "38", "day": "22", "hour": "18", "minute": "37", "second": "36", "epoch": "1758591456", "epoch\_int": "1758591456", "date": "2025-09-22", "time": "18:37:36", "iso8601\_micro": "2025-09-23T01:37:36.844721Z", "iso8601": "2025-09-23T01:37:36Z", "iso8601\_basic": "20250922T183736844721", "iso8601\_basic\_short": "20250922T183736", "tz": "PDT", "tz\_dst": "PDT", "tz\_offset": "-0700"}, "ansible\_local": {}, "ansible\_fibre\_channel\_wwn": \[\], "ansible\_python": {"version": {"major": 3, "minor": 9, "micro": 6, "releaselevel": "final", "serial": 0}, "version\_info": \[3, 9, 6, "final", 0\], "executable": "/Library/Developer/CommandLineTools/usr/bin/python3", "has\_sslcontext": true, "type": "cpython"}, "ansible\_pkg\_mgr": "homebrew", "ansible\_service\_mgr": "launchd", "gather\_subset": \["all"\], "module\_setup": true}, "invocation": {"module\_args": {"gather\_subset": \["all"\], "gather\_timeout": 10, "filter": \[\], "fact\_path": "/etc/ansible/facts.d"}}}\\n', b'')
> ok: \[capsule-v-001-mm037\]
> 
> TASK \[common : include\_tasks\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> task path: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/main.yml:26
> included: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/rm\_groups.yml for capsule-v-001-mm037
> 
> TASK \[common : user management remove global groups linux\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> task path: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/rm\_groups.yml:7
> skipping: \[capsule-v-001-mm037\] =\> (item=None) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "false\_condition": "(global\_groups\[item\].state|default('present')) == 'absent'",
> "item": null,
> "skip\_reason": "Conditional result was False"
> }
> skipping: \[capsule-v-001-mm037\] =\> {
> "changed": false,
> "msg": "All items skipped"
> }
> 
> TASK \[common : user management remove local groups linux\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> task path: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/rm\_groups.yml:20
> skipping: \[capsule-v-001-mm037\] =\> {
> "changed": false,
> "skipped\_reason": "No items in the list"
> }
> 
> TASK \[common : include\_tasks\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> task path: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/main.yml:32
> included: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/add\_groups.yml for capsule-v-001-mm037
> 
> TASK \[common : debug global\_groups\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> task path: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/add\_groups.yml:20
> ok: \[capsule-v-001-mm037\] =\> {
> "test\_global\_groups": {
> "gnupgserver": {
> "gid": 10506
> },
> "grafana": {
> "gid": 10501
> },
> "nginx": {
> "gid": 10505
> },
> "production\_ansible": {
> "gid": 10001
> },
> "prometheus": {
> "gid": 10502
> },
> "rundeck": {
> "gid": 10504
> },
> "sequoia": {
> "gid": 10507
> },
> "staging\_ansible": {
> "gid": 20001
> },
> "zookeeper": {
> "gid": 10503
> }
> }
> }
> 
> TASK \[common : user management set global groups macOS\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> task path: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/add\_groups.yml:24
> \[ERROR\]: Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'
> 
> Task failed.
> Origin: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/add\_groups.yml:24:3
> 
> 22 var: test\_global\_groups
> 23
> 24 - name: user management set global groups macOS
> ^ column 3
> 
> \<\<\< caused by \>\>\>
> 
> Finalization of task args for 'ansible.builtin.group' failed.
> Origin: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/add\_groups.yml:28:3
> 
> 26 - user\_mgmt
> 27 - admin\_accounts
> 28 group:
> ^ column 3
> 
> \<\<\< caused by \>\>\>
> 
> Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'
> Origin: /Users/chris/Projects/checkouts/capsule-cloud-ops/MacStadium\_ansible/roles/common/tasks/add\_groups.yml:30:10
> 
> 28 group:
> 29 name: "{{ item.key }}"
> 30 gid: "{{ item.gid }}"
> ^ column 10
> 
> failed: \[capsule-v-001-mm037\] (item={'key': 'production\_ansible', 'value': {'gid': 10001}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "production\_ansible",
> "value": {
> "gid": 10001
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> failed: \[capsule-v-001-mm037\] (item={'key': 'staging\_ansible', 'value': {'gid': 20001}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "staging\_ansible",
> "value": {
> "gid": 20001
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> failed: \[capsule-v-001-mm037\] (item={'key': 'grafana', 'value': {'gid': 10501}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "grafana",
> "value": {
> "gid": 10501
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> failed: \[capsule-v-001-mm037\] (item={'key': 'prometheus', 'value': {'gid': 10502}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "prometheus",
> "value": {
> "gid": 10502
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> failed: \[capsule-v-001-mm037\] (item={'key': 'zookeeper', 'value': {'gid': 10503}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "zookeeper",
> "value": {
> "gid": 10503
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> failed: \[capsule-v-001-mm037\] (item={'key': 'rundeck', 'value': {'gid': 10504}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "rundeck",
> "value": {
> "gid": 10504
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> failed: \[capsule-v-001-mm037\] (item={'key': 'nginx', 'value': {'gid': 10505}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "nginx",
> "value": {
> "gid": 10505
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> failed: \[capsule-v-001-mm037\] (item={'key': 'gnupgserver', 'value': {'gid': 10506}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "gnupgserver",
> "value": {
> "gid": 10506
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> failed: \[capsule-v-001-mm037\] (item={'key': 'sequoia', 'value': {'gid': 10507}}) =\> {
> "ansible\_loop\_var": "item",
> "changed": false,
> "item": {
> "key": "sequoia",
> "value": {
> "gid": 10507
> }
> },
> "msg": "Task failed: Finalization of task args for 'ansible.builtin.group' failed: Error while resolving value for 'gid': object of type 'dict' has no attribute 'gid'"
> }
> \[capsule-v-001-mm037\] TASK: common : user management set global groups macOS (debug)\> \[ERROR\]: Unexpected Exception, this is probably a bug: \[Errno 1\] Operation not permitted
> 
> Traceback (most recent call last):
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/cli/\_\_init\_\_.py", line 660, in cli\_executor
> exit\_code = cli.run()
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/cli/playbook.py", line 153, in run
> results = pbex.run()
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/executor/playbook\_executor.py", line 188, in run
> result = self.\_tqm.run(play=play)
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/executor/task\_queue\_manager.py", line 344, in run
> play\_return = strategy.run(iterator, play\_context)
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/plugins/strategy/linear.py", line 216, in run
> results.extend(self.\_wait\_on\_pending\_results(iterator))
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^^^^^^^^^^
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/plugins/strategy/\_\_init\_\_.py", line 793, in \_wait\_on\_pending\_results
> results = self.\_process\_pending\_results(iterator)
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/plugins/strategy/\_\_init\_\_.py", line 169, in inner
> dbg.cmdloop()
> ~~~~~~~~~~~ ^^
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/plugins/strategy/\_\_init\_\_.py", line 1139, in cmdloop
> cmd.Cmd.cmdloop(self)
> ~~~~~~~~~~~~~~~ ^^^^^^
> File "/opt/homebrew/Cellar/python@3.13/3.13.7/Frameworks/Python.framework/Versions/3.13/lib/python3.13/cmd.py", line 134, in cmdloop
> line = input(self.prompt)
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/executor/process/worker.py", line 110, in \_term
> os.killpg(self.pid, signum)
> ~~~~~~~~~ ^^^^^^^^^^^^^^^^^^
> PermissionError: \[Errno 1\] Operation not permitted
> 
> The above exception was the direct cause of the following exception:
> 
> Traceback (most recent call last):
> File "/opt/homebrew/Cellar/ansible/12.0.0/libexec/lib/python3.13/site-packages/ansible/cli/\_\_init\_\_.py", line 669, in cli\_executor
> raise AnsibleError("Unexpected Exception, this is probably a bug.") from ex
> ansible.errors.AnsibleError: Unexpected Exception, this is probably a bug: \[Errno 1\] Operation not permitted
> \`\`\`
> 
> \### Code of Conduct
> 
> \- \[x\] I agree to follow the Ansible Code of Conduct

> <https://github.com/Homebrew/homebrew-core/issues/245465>
>
> \### \`brew gist-logs \<formula\>\` link OR \`brew config\` AND \`brew doctor\` output
> 
> \`…\`\`shell
> CAPSULE-V-001-MM037:~ macstadium$ brew config
> HOMEBREW\_VERSION: 4.6.12-11-g21c60eb
> ORIGIN: https://github.com/Homebrew/brew
> HEAD: 21c60eb773618f039434d923d2522120c4df56ea
> Last commit: 32 hours ago
> Branch: main
> Core tap JSON: 23 Sep 23:37 UTC
> Core cask tap JSON: 23 Sep 23:37 UTC
> HOMEBREW\_PREFIX: /opt/homebrew
> HOMEBREW\_CASK\_OPTS: \[\]
> HOMEBREW\_FORBID\_PACKAGES\_FROM\_PATHS: set
> HOMEBREW\_MAKE\_JOBS: 10
> HOMEBREW\_SORBET\_RUNTIME: set
> Homebrew Ruby: 3.4.5 =\> /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.4.5/bin/ruby
> CPU: deca-core 64-bit arm\_donan
> Clang: 16.0.0 build 1600
> Git: 2.39.5 =\> /Library/Developer/CommandLineTools/usr/bin/git
> Curl: 8.7.1 =\> /usr/bin/curl
> macOS: 15.4-arm64
> CLT: 16.2.0.0.1.1733547573
> Xcode: N/A
> Rosetta 2: false
> 
> CAPSULE-V-001-MM037:~ macstadium$ brew doctor                                                                                                                                                                                                   
> Please note that these warnings are just used to help the Homebrew maintainers                                                                                                                                                                  
> with debugging if you file an issue. If everything you use Homebrew for is                                                                                                                                                                      
> working fine: please don't worry or file an issue; just ignore this. Thanks!                                                                                                                                                                    
>                                                                                                                                                                                                                                                 
> Warning: A newer Command Line Tools release is available.                                                                                                                                                                                       
> Update them from Software Update in System Settings.                                                                                                                                                                                            
>                                                                                                                                                                                                                                                 
> If that doesn't show you any updates, run:                                                                                                                                                                                                      
> sudo rm -rf /Library/Developer/CommandLineTools                                                                                                                                                                                               
> sudo xcode-select --install                                                                                                                                                                                                                   
>                                                                                                                                                                                                                                                 
> Alternatively, manually download them from:                                                                                                                                                                                                     
> https://developer.apple.com/download/all/.                                                                                                                                                                                                    
> You should download the Command Line Tools for Xcode 16.4.                                                                                                                                                                                      
>                                                                                                                                                                                                                                                 
>                                                                                                                                                                                                                                                 
>                                                                                                                                                                                                                                                 
> This is a Tier 2 configuration:                                                                                                                                                                                                                 
> https://docs.brew.sh/Support-Tiers#tier-2                                                                                                                                                                                                     
> You can report Tier 2 unrelated issues to Homebrew/\* repositories!                                                                                                                                                                              
> Read the above document instead before opening any issues or PRs.                                                                                                                                                                               
>                                                                                                                                                                                                                                                 
>                                                                                                                                                                                                                                                 
> Warning: Some installed formulae are deprecated or disabled.       
> You should find replacements for the following formulae:                                                                                                                                                                                        
> brew-cask-completion                                                                                                                                                                                                                          
> 
> Warning: You have the following deprecated, official taps tapped:
> Homebrew/homebrew-services
> Untap them with \`brew untap\`.
> 
> Warning: Unbrewed dylibs were found in /usr/local/lib.
> If you didn't put them there on purpose they could cause problems when
> building Homebrew formulae and may need to be deleted.
> 
> Unexpected dylibs:
> /usr/local/lib/libavcodec.60.31.102.dylib
> /usr/local/lib/libavcodec.61.19.101.dylib
> /usr/local/lib/libavcodec.61.27.101.dylib
> /usr/local/lib/libavdevice.60.3.100.dylib                                                                                                                                                                                                     
> /usr/local/lib/libavdevice.61.3.100.dylib                                                                                                                                                                                                     
> /usr/local/lib/libavdevice.61.4.100.dylib                                                                                                                                                                                                     
> /usr/local/lib/libavfilter.10.4.100.dylib                                                                                                                                                                                                     
> /usr/local/lib/libavfilter.10.6.101.dylib                                                                                                                                                                                                     
> /usr/local/lib/libavfilter.9.12.100.dylib                                                                                                                                                                                                     
> /usr/local/lib/libavformat.60.16.100.dylib                                                                                                                                                                                                    
> /usr/local/lib/libavformat.61.7.100.dylib                                                                                                                                                                                                     
> /usr/local/lib/libavformat.61.9.101.dylib                                                                                                                                                                                                     
> /usr/local/lib/libavutil.58.29.100.dylib                                                                                                                                                                                                      
> /usr/local/lib/libavutil.59.39.100.dylib                                                                                                                                                                                                      
> /usr/local/lib/libavutil.59.51.100.dylib                                                                                                                                                                                                      
> /usr/local/lib/libpostproc.57.3.100.dylib                                                                                                                                                                                                     
> /usr/local/lib/libpostproc.58.3.100.dylib                                                                                                                                                                                                     
> /usr/local/lib/libpostproc.58.4.100.dylib                                                                                                                                                                                                     
> /usr/local/lib/libswresample.4.12.100.dylib                                                                                                                                                                                                   
> /usr/local/lib/libswresample.5.3.100.dylib                                                                                                                                                                                                    
> /usr/local/lib/libswresample.5.4.100.dylib                                                                                                                                                                                                    
> /usr/local/lib/libswscale.7.5.100.dylib                                                                                                                                                                                                       
> /usr/local/lib/libswscale.8.12.100.dylib                                                                                                                                                                                                      
> /usr/local/lib/libswscale.8.3.100.dylib                                                                                                                                                                                                       
> /usr/local/lib/libx264.164.dylib                                                                                                                                                                                                              
>                                                                                                                                                                                                                                                 
> Warning: Unbrewed header files were found in /usr/local/include.                                                                                                                                                                                
> If you didn't put them there on purpose they could cause problems when                                                                                                                                                                          
> building Homebrew formulae and may need to be deleted.
> 
> Unexpected header files:
> /usr/local/include/libavcodec/\*
> /usr/local/include/libavdevice/\*
> /usr/local/include/libavfilter/\*
> /usr/local/include/libavformat/\*
> /usr/local/include/libavutil/\*
> /usr/local/include/libpostproc/\*
> /usr/local/include/libswresample/\*
> /usr/local/lib/pkgconfig/libswscale.pc
> /usr/local/lib/pkgconfig/vpx.pc
> /usr/local/lib/pkgconfig/x264.pc
> 
> Warning: Unbrewed static libraries were found in /usr/local/lib.
> If you didn't put them there on purpose they could cause problems when
> building Homebrew formulae and may need to be deleted.
> 
> Unexpected static libraries:
> /usr/local/lib/libavcodec.a
> /usr/local/lib/libavdevice.a
> /usr/local/lib/libavfilter.a
> /usr/local/lib/libavformat.a
> /usr/local/lib/libavutil.a
> /usr/local/lib/libpostproc.a
> /usr/local/lib/libswresample.a
> /usr/local/lib/libswscale.a
> /usr/local/lib/libvpx.a
> /usr/local/lib/libyasm.a
> 
> Warning: Homebrew's "sbin" was not found in your PATH but you have installed
> formulae that put executables in /opt/homebrew/sbin.
> Consider setting your PATH for example like so:
> echo 'export PATH="/opt/homebrew/sbin:$PATH"' \>\> /Users/macstadium/.bash\_profile
> \`\`\`
> 
> \### Verification
> 
> \- \[x\] My \`brew doctor\` output says \`Your system is ready to brew.\` and am still able to reproduce my issue.
> \- \[x\] I ran \`brew update\` and am still able to reproduce my issue.
> \- \[x\] I have resolved all warnings from \`brew doctor\` and that did not fix my problem.
> \- \[x\] I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.
> \- \[x\] My issue is not about a failure to build a formula from source.
> 
> \### What were you trying to do (and why)?
> 
> Run ansible-playbook but it works when I run without and with\_items, with\_flattened or with loop!
> 
> It only works with the group Ansible module!
> 
> \`\`\`
> CAPSULE-V-001-MM037:MacStadium\_ansible chris$ ansible-playbook --inventory inventory/staging/staging playbooks/manage\_users\_and\_groups.yml --private-key ~/.ssh/staging\_ansible\_id\_ed25519 --user staging\_ansible --limit capsule-v-001-mm037 -vvvvv &\> ~/Temporary/ansible-playbook.common\_role.with\_debgger.output.txt
> \`\`\`
> 
> 
> \`\`\`
> CAPSULE-V-001-MM037:MacStadium\_ansible chris$ ansible-playbook --inventory inventory/staging/staging playbooks/manage\_users\_and\_groups.yml --private-key ~/.ssh/staging\_ansible\_id\_ed25519 --user staging\_ansible --limit capsule-v-001-mm037 -v
> vvvv --tags groups\_only &\> ~/Temporary/ansible-playbook.common\_role.with\_debugger\_no\_loops.txt
> \`\`\`
> 
> add\_groups.yml (with loops):
> \`\`\`
> \---
> \# file: roles/common/tasks/add\_groups.yml
> \#
> \# Order of operation: rm\_users.yml -\> rm\_groups.yml -\> add\_groups.yml -\>
> \# add\_users.yml -\> set\_homedir\_perms.yml
> 
> \# - name: user management set global groups macOS
> \# tags:
> \# - user\_mgmt
> \# - admin\_accounts
> \# group:
> \# name: "{{ item }}"
> \# gid: "{{ custom\_groups\[item\].gid if custom\_groups\[item\] is defined else global\_groups\[item\].gid | mandatory }}"
> \# state: "{{ global\_groups\[item\].state | default('present') }}"
> \# with\_items: "{{ global\_groups }}"
> \# when:
> \# - (global\_groups\[item\].state|default('present')) == 'present'
> \# - item not in skip\_groups
> 
> - name: user management set global groups macOS
> tags:
> - user\_mgmt
> - admin\_accounts
> group:
> name: "{{ item }}"
> \# gid: "{{ custom\_groups\[item\].gid if custom\_groups\[item\] is defined else global\_groups\[item\].gid | mandatory }}"
> \# gid: "{{ global\_groups\[item\].gid }}"
> \# state: "{{ global\_groups\[item\].state | default('present') }}"
> gid: "{{ item.gid | mandatory }}"
> state: "{{ item.state | default('present') }}"
> \# with\_list: global\_groups
> loop: "{{ global\_groups | dict2items }}"
> when:
> - (global\_groups\[item\].state|default('present')) == 'present'
> - item not in skip\_groups
> 
> - name: user management set local groups macOS
> tags:
> - user\_mgmt
> group:
> name: "{{ item }}"
> gid: "{{ item.gid | mandatory }}"
> state: "{{ item.state | default('present') }}"
> with\_items: "{{ local\_groups }}"
> when: (global\_groups\[item\].state|default('present')) == 'present'
> 
> - name: user management set custom groups macOS
> tags:
> - user\_mgmt
> group:
> name: "{{ item | mandatory }}"
> gid: "{{ custom\_groups\[item\].gid | mandatory }}"
> state: "{{ custom\_groups\[item\].state | default('present') }}"
> with\_items: "{{ custom\_groups.keys() }}"
> when: custom\_groups is defined
> 
> \# vim:ft=ansible:
> \`\`\`
> 
> add\_groups.yml without loops:
> \`\`\`
> \---
> \# file: roles/common/tasks/add\_groups.yml
> \#
> \# Order of operation: rm\_users.yml -\> rm\_groups.yml -\> add\_groups.yml -\>
> \# add\_users.yml -\> set\_homedir\_perms.yml
> 
> \# - name: user management set global groups macOS
> \# tags:
> \# - user\_mgmt
> \# - admin\_accounts
> \# group:
> \# name: "{{ item }}"
> \# gid: "{{ custom\_groups\[item\].gid if custom\_groups\[item\] is defined else global\_groups\[item\].gid | mandatory }}"
> \# state: "{{ global\_groups\[item\].state | default('present') }}"
> \# with\_items: "{{ global\_groups }}"
> \# when:
> \# - (global\_groups\[item\].state|default('present')) == 'present'
> \# - item not in skip\_groups
> 
> \#- name: debug global\_groups
> \# debug:
> \# var: test\_global\_groups
> 
> \- name: user management set global groups macOS
> tags:
> - user\_mgmt
> - admin\_accounts
> - groups\_only
> group:
> name: production\_ansible
> gid: 10001
> state: present
> \# gid: "{{ item.gid }}"
> \# state: "{{ item.state | default('present') }}"
> \# loop: "{{ test\_global\_groups | dict2items }}"
> \# when:
> \# - (test\_global\_groups\[item\].state|default('present')) == 'present'
> \# - item not in skip\_groups
> \#- name: user management set global groups macOS
> \# tags:
> \# - user\_mgmt
> \# - admin\_accounts
> \# group:
> \# name: "{{ item.key }}"
> \# gid: "{{ item.gid }}"
> \# state: "{{ item.state | default('present') }}"
> \# loop: "{{ test\_global\_groups | dict2items }}"
> \# when:
> \# - (test\_global\_groups\[item\].state|default('present')) == 'present'
> \# - item not in skip\_groups
> 
> \#- name: user managment set local groups macOS
> \# tags:
> \# - user\_mgmt
> \# group:
> \# name: "{{ item }}"
> \# gid: "{{ item.gid | mandatory }}"
> \# state: "{{ item.state | default('present') }}"
> \# with\_items: "{{ local\_groups }}"
> \# when: (global\_groups\[item\].state|default('present')) == 'present'
> 
> \#- name: user managment set custom groups macOS
> \# tags:
> \# - user\_mgmt
> \# group:
> \# name: "{{ item }}"
> \# gid: "{{ custom\_groups\[item\].gid | mandatory }}"
> \# state: "{{ custom\_groups\[item\].state | default('present') }}"
> \# with\_items: "{{ custom\_groups.keys() }}"
> \# when: custom\_groups is defined
> \#
> ...
> \# vim:ft=ansible
> \`\`\`
> 
> group\_vars/all/group\_list:
> \`\`\`
> \---
> \# file: groups\_vars/all/group\_list \[0/1865\]
> \# desc: Dictionary of all groups, both global and local.
> \# Any group whose gid doesn't match the user's uid must be declared.
> \#
> \# Example:
> \# (key) dba:
> \# (required) gid: 10019
> \# (optional) state: present
> \#
> 
> global\_groups:
> production\_ansible:
> gid: 10001
> staging\_ansible:
> gid: 20001
> grafana:
> gid: 10501
> prometheus:
> gid: 10502
> zookeeper:
> gid: 10503
> rundeck:
> gid: 10504
> nginx:
> gid: 10505
> gnupgserver:
> gid: 10506
> sequoia:
> gid: 10507
> 
> \#group\_list:
> \# production\_ansible:
> \# gid: 10001
> \# staging\_ansible:
> \# gid: 20001
> \# grafana:
> \# gid: 10501
> \# prometheus:
> \# gid: 10502
> \# zookeeper:
> \# gid: 10503
> \# rundeck:
> \# gid: 10504
> \# nginx:
> \# gid: 10505
> 
> \## These lists should be declared under group\_vars or host\_vars. These empty lists
> \## are here for compatibility. 
> local\_groups: \[\]
> custom\_groups: {}
> local\_remove\_groups: \[\]
> local\_admin\_users: \[\]
> local\_service\_users: \[\]
> local\_remove\_users: \[\]
> custom\_service\_users: \[\]
> host\_local\_service\_users: \[\]
> 
> global\_remove\_groups:
> 
> \#local\_remove\_groups:
> 
> \#global\_groups:
> 
> \#local\_groups:
> 
> ...
> \# vim:ft=ansible
> \`\`\`
> 
> \### What happened (include all command output)?
> 
> \[ansible-playbook.common\_role.with\_debgger.output.txt\](https://github.com/user-attachments/files/22504114/ansible-playbook.common\_role.with\_debgger.output.txt)
> 
> \### What did you expect to happen?
> 
> \[ansible-playbook.common\_role.with\_debugger\_no\_loops.txt\](https://github.com/user-attachments/files/22504124/ansible-playbook.common\_role.with\_debugger\_no\_loops.txt)
> 
> \### Step-by-step reproduction instructions (by running \`brew\` commands)
> 
> \`\`\`shell
> brew reinstall $(brew deps ansible) ansible
> chown -R macstadium /opt/homebrew/Cellar/readline/8.3.1
> brew reinstall $(brew deps ansible) ansible
> chown -R macstadium /opt/homebrew/Cellar/readline/8.3.1
> brew reinstall $(brew deps ansible) ansible
> sudo chown -R macstadium /opt/homebrew/Cellar/readline/8.3.1
> brew reinstall $(brew deps ansible) ansible
> brew reinstall $(brew deps ansible) ansible
> brew doctor
> brew reinstall $(brew deps ansible) ansible
> cd ~/Library/Caches/Homebrew/
> brew reinstall readline
> brew uninstall readline
> brew uninstall --ignore-dependencies readline
> brew uninstall --force readline
> brew uninstall --force --ignore-dependencies readline
> brew install readline
> brew reinstall $(brew deps ansible) ansible
> brew uninstall --force --ignore-dependencies sqlite
> brew reinstall $(brew deps ansible) ansible
> brew uninstall --force --ignore-dependencies xz
> brew reinstall $(brew deps ansible) ansible
> \`\`\`

---

<div class="post-metadata">

**Author:** ![utoddl](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/utoddl/32/249_2.png) [@utoddl](https://forum.ansible.com/u/utoddl)\
**Post date:** [September 24, 2025, 3:00am UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/33 "2025-09-24T03:00:04Z")

</div>

Last week - six days ago now - you said

> [@Gittes](#):
>
> I tried putting:
> 
> ```auto
> loop: '{{ global_groups | dict2items }}'
> 
> ```

Why did you take _that_ suggestion and not _any of the other suggestions_?

If someone in one of those other projects’ bug trackers asked you to try this or that or the other thing, would you do it then? What do you expect people in those other projects to do for you that hasn’t been done here? How important to you is getting this play working? Not very, evidently, because fixing this is much easier that filing bogus bug reports in multiple projects. At this point, it no longer appears you’re seeking help with this code, but I don’t know what you’re really playing at.

Three hours ago I gave you [working code](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/30) that will fix your problem. Have you run it yet?

---

<div class="post-metadata">

**Author:** ![gundalow](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/gundalow/32/99_2.png) [@gundalow](https://forum.ansible.com/u/gundalow)\
**Post date:** [September 24, 2025, 8:27am UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/34 "2025-09-24T08:27:38Z")

</div>

@Gittes Hi,  
I’m part of the Ansible Community Engineering team at Red Hat (who run this forum, and look after Ansible on GitHub).

It seems like you’ve gotten stuck, and are asking for help on the Ansible Forum, which is the right thing to do.

However you appear to be opening [multiple GitHub issues](https://github.com/ansible/ansible/issues?q=is%3Aissue%20author%3Agittes) (and against [homebrew](https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue%20author%3Agittes)) about the same issue, as well this forum post and [this one](https://forum.ansible.com/t/ansible-plabook-keeps-saying-ansible-vault-variables-are-undefined/44284).

I can see multiple people have kindly offered you guidance, including giving you code to test.

When you signed up for your Ansible Forum account, you acknowledged and said you’d follow the [Ansible Code of Conduct](https://docs.ansible.com/ansible/devel/community/code_of_conduct.html)

**Your actions**

- Only use this forum thread
- Carefully read the replies
- Rather than saying “it doesn’t work” include a clear Ansible Tasks and the the full output and error message

If you continue to spam you will be banned from Ansible Forum and Ansible’s GitHub organization.

---

<div class="post-metadata">

**Author:** ![Gittes](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@Gittes](https://forum.ansible.com/u/Gittes)\
**Post date:** [September 25, 2025, 3:18am UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/35 "2025-09-25T03:18:00Z")

</div>

Who do I contact on this forum via email to delete these post and conversation please?

---

<div class="post-metadata">

**Author:** ![Gittes](https://avatars.discourse-cdn.com/v4/letter/g/839c29/32.png) [@Gittes](https://forum.ansible.com/u/Gittes)\
**Post date:** [September 25, 2025, 3:20am UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/36 "2025-09-25T03:20:29Z")

</div>

How do I get someone to also delete this conversation thread too please?

> [@ansible-plabook keeps saying ansible-vault variables are undefined!!](https://forum.ansible.com/t/ansible-plabook-keeps-saying-ansible-vault-variables-are-undefined/44284):
>
> Hello everyone! I’m working on a project for a company I am working for. Whenever I use ansible-playbook with three variable files, two files are encrypted with ansible-vault and each file has one variable. The variables for each file are the\_vault\_test, the\_vault\_test2 and the\_test. Here is the file/directory structure and the output of ansible-playbook: CAPSULE-V-001-MM037:test chris$ tree . ├── 003\_vault\_secrets\_test.enc ├── ansible.cfg ├── group\_vars │ └── all │ ├── 002\_vau…

---

<div class="post-metadata">

**Author:** ![demetrioparrilla](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@demetrioparrilla](https://forum.ansible.com/u/demetrioparrilla)\
**Post date:** [October 14, 2025, 1:04pm UTC](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511/37 "2025-10-14T13:04:39Z")

</div>

Th site are really helpful and full of knowledge

[Previous page](https://forum.ansible.com/t/ansible-playbook-does-not-working-with-dictionary-and-with-items-loop/44511.md?page=1)
