Error when importing ansible roles

Cannot import Ansible roles

**Foreman and Proxy versions:1.18.2

**Foreman and Proxy plugin versions:
foreman-tasks 0.13.4
foreman_ansible 2.2.7
foreman_remote_execution 1.5.6

Other relevant data:
After I select the role from the menu and hit update I get the below error.

logs:

2018-09-18T08:59:51 [I|app|] Started POST "/ansible/ansible_roles/confirm_import" for 172.16.124.45 at 2018-09-18 08:59:51 +0000
2018-09-18T08:59:51 [I|app|4da16] Processing by AnsibleRolesController#confirm_import as HTML
2018-09-18T08:59:51 [I|app|4da16]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"mvlxkchFOiz3ObRokUA3+/R/K6aD7Dm0LHc9LrnljzsInMiNlRSbt87fqLA6CAPJdtbJHVAvvevO/rpaHQnVvA==", "changed"=>{"new"=>{"f500.dumpall"=>"{\"id\":null,\"name\":\"f500.dumpall\",\"created_at\":null,\"updated_at\":null}"}}, "commit"=>"Update"}
2018-09-18T08:59:51 [I|app|4da16] Current user: admin (administrator)
2018-09-18T08:59:51 [W|app|4da16] Action failed
NoMethodError: undefined method `each_value' for #<ActionController::Parameters:0x00007f31283c9a78>
Did you mean?  each_pair

I actually had some issues using the 2.2.7 release of ansible plugin as well while importing roles. Did you upgrade to 2.2.7 manually, as I’m not sure it’s the default version yet? I would suggest downgrading to 2.2.3 (at least, here I’m using 2.2.3 as it seems to be stable on 1.19). I think more investigation is needed to confirm if this is “just” a dependency issue or a bug in the code of 2.2.7? For now I would try the downgrade unless you really need a fix from the 2.2.7?

It is a known bug, I recommend dowgrading until a new version with a fix is released.

Actually 2.2.9 is out for a while - 26.9.2018, available in 1.19 repos, could you try upgrading? That should fix the problem.

2.2.9 fixed the problem, thank you