galaxyproject / ansible-gxadmin

0 stars 4 forks source link

Update the make command for newer community general package #15

Closed lmfaber closed 1 month ago

lmfaber commented 1 month ago

Hi everyone,

I tried installing Galaxy using your ansible scripts, but noticed that this role has a bug with newer ansible versions.

Using the following collection

When trying to run ansible-playbook galaxy.yml, it will throw the following error.

ERROR! couldn't resolve module/action 'community.general.system.make'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/home/.../.../galaxy/galaxy/roles/galaxyproject.gxadmin/tasks/main.yml': line 16, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Compile gxadmin when there are updates
  ^ here

The error originates from the community.general moving their make command from community.general.system.make to community.general.make.

Changing it in the role in tasks/main.yml accordingly will fix this issue.

- name: Compile gxadmin when there are updates
  community.general.system.make:
    chdir: "{{ gxadmin_dir }}"
    target: gxadmin
  when: |
    __gxadmin_git_update_result is changed or  not __gxadmin_check.stat.exists

It would be nice to update this in the ansible package so others have a smoother installation process.

Cheers.

hexylena commented 1 month ago

@lmfaber if you'd like to open a PR for this we can merge it :)

lmfaber commented 1 month ago

I have created a pull request with the change. Will you create a new 'image' in ansible galaxy? I can't really tell you at which specific version the change was done, as I currently can't find it in the documentation. Is it possible to give version restraints for ansible 'images' on ansible galaxy?

hexylena commented 1 month ago

We will make a new release. It is not easy to communicate with ansible which versions of ansible are supported by which tags of a specific role (we can set a min version but that doesn't necessarily reflect community roles), so we will continue on with the assumption that people are on a very recent ansible (or will update, or will vendor the dependency and un-patch this.)

lmfaber commented 1 month ago

Thanks for creating that release on ansible so fast. Keep up the good work! :)