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

ansible.controller.notification_template needs update_secrets parameter #15825

Open
4 of 9 tasks
kk-at-redhat opened this issue Feb 8, 2025 · 0 comments
Open
4 of 9 tasks

Comments

@kk-at-redhat
Copy link

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.

Feature type

Enhancement to Existing Feature

Feature Summary

Currently ansible.controller.notification_template is not idempotent when notification_configuration contains encrypted fields.

name: 'Slack A'
notification_type: slack
organization: A
notification_config:
  token: '$encrypted$',
  channels:
    - vvvv

It would be nice to have update_secrets parameter like ansible.controller.user module does, to make runs idempotent unless user is updating secrets.

Select the relevant components

  • UI
  • API
  • Docs
  • Collection
  • CLI
  • Other

Steps to reproduce

Run

ansible -m ansible.controller.notification_template --args="name='Slack B' organization='B' notification_type=slack notification_configuration={'token':'aaaaaa','channels':['vvvvvv']}" localhost

and then

ansible -m ansible.controller.notification_template --args="name='Slack B' organization='B' notification_type=slack notification_configuration={'token':'$encrypted$','channels':['vvvvvv']}" localhost

Current results

localhost | CHANGED => {
"changed": true,
"id": 8,
"name": "Slack B"
}

localhost | CHANGED => {
"changed": true,
"id": 8
}

Sugested feature result

localhost | CHANGED => {
"changed": true,
"id": 8,
"name": "Slack B"
}

===> with update_secrets=false
localhost | SUCCESS => {
"changed": false,
"id": 8
}

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant