Unable to remove notification_templates_* by using awx.awx.job_template

I’m using awx.awx.job_template to create notifications for job tempate. But I can’t remove these notification rules after adding with code. I already tried removing notification_templates_error or set this value as empty '' but notification still there.
Actually I can work around by using UI, but I want to know how I can manage it without interacting with UI.

I remember survey also have the same problem.

Hi. similar issue has been reported and I think your issue should also be reported as a kind of bug: Empty value in execution_environment should remove selections (ansible.controller.job_template) · Issue #14841 · ansible/awx · GitHub

I don’t know how feasible this is for you, but it is technically possible to remove it by using the ansible.builtin.uri module to directly manipulate the REST API instead: 11. AWX API Reference Guide — Ansible AWX community documentation

2 Likes

Thanks for your suggestion. :sweat_smile:
:sob: Actually I may do it via API, but for the long terms it not really nice. I have AWX in many environments, some of them I can’t get access to.Delete notification via API seems not really good solution in my case and it quite hard to control when I remove/add new job templates.

Again, Thank you very much.