Can't deselect ansible role from host

I have a host which has both a hostgroup set as well as some additional hosts selected. Now I want to remove a role, since I don’t need it anymore. I click on the “minus”-button and the role is removed from the list. I save the host and the system toasts me that all is well! However, the role is not really removed; when I return to the edit screen I see the role I deselected earlier back in the selected list. This doesn’t appear to be a cosmetic issue as this is also reflected when I try to run my ansible roles.

Expected outcome:
Clicking the minus and saving successfully results in the removal of the ansible role

Foreman and Proxy versions:
Host created using Foreman 1.21 (not sure if it’s relevant)
Running version 1.22.0 of both proxy and foreman

Foreman and Proxy plugin versions:
Ansible 2.8
Ansible plugin 3.0.2
Ansible Smart Proxy plugin 2.1.2

Additional info:

It seems like I can’t empty the list of host-specific roles. If I remove one role, and replace it by another it does seem to register. Removing that role, resulting in an empty list, results in the model not being update.

I have the same problem, with the same versions of Foreman, so it’s probably not a local problem.

I have a no-op “dummy” role that I assign to all hosts, else changes that would result in an empty role list are silently ignored.

The work-around is effective, so it’s not a major problem for me, but it does cause confusion.


Was looking through the changes in ansible and low-and-behold:

Will probably be fixed in 1.23 already! :slight_smile:
I’m loving this big community ^^

Kind regards,