Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Attribute Specific No Log Parameter #83238

Open
1 task done
Poseidon6473 opened this issue May 13, 2024 · 1 comment
Open
1 task done

Implement Attribute Specific No Log Parameter #83238

Poseidon6473 opened this issue May 13, 2024 · 1 comment
Labels
data_tagging feature This issue/PR relates to a feature request.

Comments

@Poseidon6473
Copy link

Poseidon6473 commented May 13, 2024

Summary

When writing playbooks and roles, it would be very helpful for the process of debugging to allow for functionality that either stands alongside the typical "no_log: true" or changes it in some way to only remove logging for specific attributes of a task.

For example, I add a host to the current play, but I want to see all other information printed to the logs/stdout except the password, with current no_log functionality, this is not possible -- it's either all or nothing.

I was looking through the Ansible Core code to see if this was something that I could just put a PR up for myself, but the no_log functionality is quite intertwined with a lot of other stuff -- and is out of my purview for myself (I don't know Python lol); so this may be a feature that is too much work for too little reward, but I think it's a very good nice-to have (I just can't implement it myself)

Issue Type

Feature Idea

Component Name

ansible-core core

Additional Information

- name: Add Host to Play
  add_host:
    name: "{{ target.host.ip }}"
    groups: target-platform
    ansible_connection: ssh
    ansible_user: "{{ target.host.user }}"
    ansible_password: "{{ passwd }}"
  no_log_attr: true, ansible_password

# Select, 'True' to enable no logging of specific attribute. Referance ansible_password as the argument to specify the attribute to not be logged.

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibot
Copy link
Contributor

ansibot commented May 13, 2024

Files identified in the description:

None

If these files are incorrect, please update the component name section of the description or use the component bot command.

@ansibot ansibot added feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. labels May 13, 2024
@mkrizek mkrizek added data_tagging and removed needs_triage Needs a first human triage before being processed. labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data_tagging feature This issue/PR relates to a feature request.
Projects
None yet
Development

No branches or pull requests

3 participants