rvm / rvm1-ansible

The official ansible RVM role to install and manage your Ruby versions.
MIT License
271 stars 136 forks source link

Use check_mode instead of always run #124

Closed veger closed 7 years ago

veger commented 7 years ago

Fixes the following deprecation warning:

TASK [rvm_io.ruby : Detect installed ruby patch number] **** [DEPRECATION WARNING]: always_run is deprecated. Use check_mode = no instead.. This feature will be removed in version 2.4. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

Using Ansible 2.2.0.0

veger commented 7 years ago

Hm... test is build with Ansible 2.0.0?

pkuczynski commented 7 years ago

According to Travis config they run with 2.2.0:

install:
  - 'pip install ansible==2.0.0'
  - 'printf "[defaults]\nroles_path = ../" > ansible.cfg'
pkuczynski commented 7 years ago

The build failed with the message:

ERROR! 'check_mode' is not a valid attribute for a Task\n\nThe error appears to have been in '/home/travis/build/rvm/rvm1-ansible/tasks/rubies.yml': line 26, column 3
pkuczynski commented 7 years ago

check_mode was introduced in ansible 2.2 so we have few options here. I guess we could bump minimum ansible version to 2.2 in meta/main.yml.

@lpaulmp what you think?

lpaulmp commented 7 years ago

@pkuczynski sounds good to me bump the version since the current version in travis is 2.0 for tests and it is getting behind of the last ansible releases, keep updated the role with the last ansible releases is even a good practice :)

lpaulmp commented 7 years ago

I just pushed a PR with those changes https://github.com/rvm/rvm1-ansible/pull/125

pkuczynski commented 7 years ago

I just merged #125 which includes this change. Thank you @veger for pointing it out!