Unable to assigne ansible Roles to Host / Hostgroups

ansible

#41

Ok, I’ll and hopefully others will be happy to help setting up nightly box, there may be some issue with current nightlies. Could you please open a new thread for bigger awareness?


#42

I think I know what’s going on. There was incompatible change in Foreman 1.21 about search paths. Did you encounter this with earlier foreman_ansible 2.3 versions? I’m spinning up a new 1.21 box to see if I can fix this quickly.

We should invest into some integration tests to avoid these problems.


#44

With version 2.3.4 the variables was working fine (I was using hammer cli to assign ansible roles to hosts becuase of the problems with gui - everything was working fine except gui).
Right now I’ve deleted:

display_link_if_authorized(_('New Ansible Variable'), hash_for_new_ansible_variable_path, :class => "btn btn-default no-float"),

from /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible-2.3.5/app/views/ansible_variables/index.html.erb

and UI is working fine (I know this is not proper fix, only workaround with loosing some features).


#45

We found out what is the cause. The revert commit reverted some definitions in routes.rb which should remain there. @ezr-ondrej will send a fix and we’ll work on 2.3.6 fixing release soon.


#46

I have posted a fix PR. Hope the revert didn’t broke more. The UI routes doesn’t seem to be needed and the package.json seems to work in reverted version.


#47

Yessir. I’ll nuke my test system from orbit tonight, and start a new thread with complete details re: nightly build install issues.

It wouldn’t surprise me to discover that I have other issues.


#48

That should be updated to use http://yum.puppetlabs.com/puppet6-release-el-7.noarch.rpm (this will also be an issue with Katello 3.12).


#49

Hello, here’s the scratch build for early testers. It should get to 1.21 repos in a day or two. I contains the fix reported by @pawelwiecaszek about ansible variables. Further testing appreciated.


#50

@ekohl, this fixed the install issue. Thanks, I’ll note this in the other thread I started.


#51

Hi there I installed the package and got this following error when I try to open the ansible variables context.:
AnsibleVariablesController#index is missing a template for this request format and variant. request.formats: ["text/html"] request.variant: [] NOTE! For XHR/Ajax or API requests, this action would normally respond with 204 No Content: an empty white screen. Since you're loading it in a web browser, we assume that you expected to actually render a template, not nothing, so we're showing an error to be extra-clear. If you expect 204 No Content, carry on. That's what you'll get from an XHR or API request. Give it a shot

Any hints? I’m using Katello in 3.11 and Foreman 1.21 with Ansible :wink:


#52

Seems like view file is missing. Is this rpm/deb based installation? What’s exact version of foreman_ansible that you have?


#53

Yes, this is indeed an rpm/deb based installation. I installed the foreman_ansible package you provided a few posts earlier. tfm-rubygem-foreman_ansible-2.3.6-1.fm1_21.el7.noarch.rpm, right now I downgraded back to 2.3.5.


#54

That would either mean 2.3.6 build is corrupted (I doubt) or somehow your instance got somehow corrupted. If you install 2.3.6, you should see /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible-2.3.6/app/views/ansible_variables/index.html.erb present. I will spin up a new 1.21 box and see if I can reproduce myself.


#55

Sorry, I messed it up, restart the httpd and then it works, restarting only foreman wasn’t enough …
I tried a fresh installation on my vagrant box.