stefangweichinger/ansible-rclone

Can't install specific version of rclone

mjmayer opened this issue · 3 comments

The README.me indicates that the variable rclone_version, is not set by default, but can be defined as stable, beta or a specific version. But the logic in tasks/main.yml don't support the specific version option.

- name: Do stable install
  include_tasks: stable.yml
  when:
    - rclone_version is undefined or
      rclone_version == 'stable' or
      rclone_version != 'beta'

- name: Do beta install
  include_tasks: beta.yml
  when: rclone_version == 'beta'

@mjmayer correct observation, thanks!
To me it seems this never worked, not even before my latest changes?

I'll try to come up with a suggestion/PR in the next few days.

Above PR seems to work for me, in my molecule tests it worked fine to run:

TEST_VERSION=1.50.2 molecule converge

It would be better to exactly check the format of the version string ... and fail explicitly if it isn't formatted correctly.
And there should be a molecule test case for a version number in rclone_version (so far I test for stable and beta only).

Fixed in #70. The role supports the variables rclone_release and rclone_version. The release is used to specify a beta and stable release, with stable being the default. rclone_version is an optional variable used to install a specific version.