# New Secret Masking Feature - 2.22

**URL:** <https://forum.ansible.com/t/new-secret-masking-feature-2-22/46291>\
**Category:** Project Discussions\
**Tags:** security, ansible-devel, ansible-core\
**Created:** [September 11, 2026, 2:55am UTC](https://forum.ansible.com/t/new-secret-masking-feature-2-22/46291 "2026-09-11T02:55:05Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![kpfleming](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kpfleming](https://forum.ansible.com/u/kpfleming)\
**Post date:** [November 16, 2026, 5:44pm UTC](https://forum.ansible.com/t/new-secret-masking-feature-2-22/46291/21 "2026-11-16T17:44:59Z")

</div>

Yes… I really haven’t got a clue which of the multiple instances of `60` in my stack of playbooks and roles is triggering secret redaction.

---

<div class="post-metadata">

**Author:** ![kpfleming](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kpfleming](https://forum.ansible.com/u/kpfleming)\
**Post date:** [November 16, 2026, 5:49pm UTC](https://forum.ansible.com/t/new-secret-masking-feature-2-22/46291/22 "2026-11-16T17:49:37Z")

</div>

OK, I’ve sussed out one. `/bin/bash` is being treated as a secret because it’s one attribute of a map which is stored in a file managed by `ansible-vault`. This seems reasonable on the surface, but the value is only in that file because it’s not possible to have portions of a map vaulted while other portions are not vaulted (at least not easily), and storing the vaulted and non-vaulted portions of the map in separate places to combine together would be extra work. I’ll probably do that, so that my vault files don’t contain anything which is not actually a secret.

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [November 16, 2026, 6:06pm UTC](https://forum.ansible.com/t/new-secret-masking-feature-2-22/46291/23 "2026-11-16T18:06:31Z")

</div>

That’s similar to some fun I had when looking into automatically registering decrypted values as secrets in community.sops. In the end I decided to not automatically register decrypted values as secrets, but allow users to request community.sops to do that if they want.

You might also be interested in this discussion: [How to register secrets - as plugin developers, and users?](https://forum.ansible.com/t/46448)

---

<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:** [November 16, 2026, 6:49pm UTC](https://forum.ansible.com/t/new-secret-masking-feature-2-22/46291/24 "2026-11-16T18:49:18Z")

</div>

> [@kpfleming](#):
>
> because it’s not possible to have portions of a map vaulted while other portions are not vaulted (at least not easily)

If I may blow my own horn a bit, [utoddl](https://gist.github.com/utoddl)/**[av-filter](https://gist.github.com/utoddl/66baa4154618ba1fc8ec8127483e7e89)** makes that a lot easier, at least if you’re using an editor which allows you to select some lines and pass them through a filter. At least `vi` and `ne` will do this, and I’m sure other editors will, too.

It’s dead simple to use if you set some environment variables up front. Select a subset of the names and values in your yaml, pass them through `av-filter`, and it vaults your unvaulted values and unvaults your vaulted values.

This has made it practical for me to quit using opaque `*.vault` files.

---

<div class="post-metadata">

**Author:** ![kpfleming](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@kpfleming](https://forum.ansible.com/u/kpfleming)\
**Post date:** [November 16, 2026, 7:38pm UTC](https://forum.ansible.com/t/new-secret-masking-feature-2-22/46291/25 "2026-11-16T19:38:32Z")

</div>

> [@utoddl](#):
>
> At least `vi` and `ne` will do this, and I’m sure other editors will, too.

I’m an Emacs user so I’ll make the obligatory comment that this should be written in Emacs Lisp so it can be executed directly in the editor 🙂

---

<div class="post-metadata">

**Author:** ![pkingstonxyz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/pkingstonxyz/32/8844_2.png) [@pkingstonxyz](https://forum.ansible.com/u/pkingstonxyz)\
**Post date:** [November 16, 2026, 7:40pm UTC](https://forum.ansible.com/t/new-secret-masking-feature-2-22/46291/26 "2026-11-16T19:40:49Z")

</div>

Wanted to chime in and give some assurance that the current aggression of the secret masker is actively being discussed/worked on. There are a few related issues on the subject for anyone who would like to follow up/see it on github:

- A request to disable the feature altogether [Describe how to disable "Masking secrets in Ansible output" · Issue #4157 · ansible/ansible-documentation · GitHub](https://github.com/ansible/ansible-documentation/issues/4157)
- One around nested data types [Play output unreadable: integers in a vaulted list are stripped from hostnames · Issue #87910 · ansible/ansible · GitHub](https://github.com/ansible/ansible/issues/87910)
- One concerning short sentinel values like `'*'` [user: the documented locked-password value `'*'` is registered as a secret and masks every `*` in the output · Issue #87893 · ansible/ansible · GitHub](https://github.com/ansible/ansible/issues/87893)
- And another about general aggression in what is considered secret/masked: [$REDACTED$ in role names in the console output gives away possible secrets · Issue #87920 · ansible/ansible · GitHub](https://github.com/ansible/ansible/issues/87920)

---

<div class="post-metadata">

**Author:** ![kks](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kks/32/10352_2.png) [@kks](https://forum.ansible.com/u/kks)\
**Post date:** [November 16, 2026, 7:45pm UTC](https://forum.ansible.com/t/new-secret-masking-feature-2-22/46291/27 "2026-11-16T19:45:11Z")

</div>

> [@pkingstonxyz](#):
>
> - One concerning short sentinel values like `'*'`

I’ve seen similar approach somewhere recently!

[https://sshhole.com/](https://sshhole.com/)

[Previous page](https://forum.ansible.com/t/new-secret-masking-feature-2-22/46291.md?page=1)
