theforeman / foreman-ansible-modules

Ansible modules for interacting with the Foreman API and various plugin APIs such as Katello
GNU General Public License v3.0
147 stars 163 forks source link

Enforce/Document ansible >= 2.3 #56

Closed akofink closed 5 years ago

akofink commented 6 years ago

It seems ansible v. 2.2 has some issues with requiring module support code:

fatal: [localhost]: FAILED! => {"failed": true, "msg": "Could not find imported module support code for katello_upload.  Looked for either handle_no_nailgun or foreman_helper"}
mdellweg commented 6 years ago

OK for >= 2.3. Is it like Require: ansible >= 2.3.0 in the Documentation variable? Should we implement a test for this before failing to import handle_no_nailgun?

akofink commented 6 years ago

I believe so, like this.

Fobhep commented 6 years ago

@akofink I am currently trying to tackle that issue and I came up with a bunch of questions:

Fobhep commented 6 years ago

Generally it seems a good idea to go not beyond a certain ansible version. I am just wondering wether we want to connect a failure to an ansible version being below a minimum, or to a failed import of module_utils or to both

mdellweg commented 6 years ago

From 2.3 Release notes:

Allow module_utils for custom modules to be placed in site-specific directories and shipped in roles

Fobhep commented 6 years ago

ok fair enough. I guess the older modules probabally use a shared module_utils for the whole ansible project

akofink commented 6 years ago

@Fobhep I believe I was using Python 2.7 native on Centos 7.4. It's been a couple months :thinking:. We've seen differences with virtualenv vs. native during debugging (i.e. using the hacking/test-module with -D).

evgeni commented 5 years ago

We documented this, and 2.3 is quite old. Shall this issue be closed? I'd say so :)