New Secret Masking Feature - 2.22

Last week I upgraded to Ansible 2.22, and I’m ‘enjoying’ the appearance of REDACTED throughout the Ansible output. In my situation the string kpfleming is considered a secret, I’m not sure which module is marking it that way but it is.

The result is various redactions like this:

TASK [garage_instance : ansible.builtin.include_tasks] *****************************************************************************************************************************************************
included: /home/$REDACTED$/git-personal/km6g/ansible/playbooks/imports/enable_and_start_unit_first_install.yml for pkgprx26
TASK [$REDACTED$.systemd_networkd.network : manage network] *************************************************************************************************************************************************
skipping: [net25]
TASK [configure ProxyNDP for container's GUA] **************************************************************************************************************************************************************
included: $REDACTED$.systemd_networkd.network for net25

Also apparently the string 60 has been marked as secret:

TASK [mastodon : reload services if needed] ****************************************************************************************************************************************************************
[WARNING]: The variable 'unit_name' is already in use.
Origin: /home/$REDACTED$/git-personal/km6g/ansible/roles/mastodon/tasks/main.yml:261:15

259   loop: "{{ unit_names }}"
2$REDACTED$   loop_control:
261     loop_var: unit_name
                  ^ column 15
ok: [rss25 -> localhost] => (item=2$REDACTED$7:5300:203:8$REDACTED$2:4242::9)

And the string /bin/bash has been marked as a secret:

TASK [nas20 : configure users] *****************************************************************************************************************************************************************************
ok: [nas20] => (item={'user': '$REDACTED$', 'password': '$REDACTED$', 'shell': '$REDACTED$'})
ok: [nas20] => (item={'user': '$REDACTED$', 'password': '$REDACTED$', 'shell': '$REDACTED$'})

I understand that this feature is quite limited because the output generators don’t have any context to understand when a string is or is not being used as a secret, but at this point I’d really prefer to turn off this redaction process because it’s causing much more harm than good.