Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes bare variables in conditionals (deprecation warnings with Ansible 2.8+) #204

Merged
merged 3 commits into from
Jul 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### NEXT

* ...
* Fixes bare variables in conditionals (deprecation warnings with Ansible 2.8+) (#204)

### 2.1.2
2018-12-28 · [Changes](https://github.com/rvm/rvm1-ansible/compare/v2.1.1...v2.1.2)
Expand Down
8 changes: 4 additions & 4 deletions tasks/rubies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
failed_when: False
register: detect_rubies
with_items: '{{ rvm1_rubies }}'
when: rvm1_rubies
when: rvm1_rubies | bool

- name: Install rubies
command: '{{ rvm1_rvm }} install {{ item.item }} {{ rvm1_ruby_install_flags }}'
when: rvm1_rubies and item.rc|default(0) != 0
when: rvm1_rubies | bool and item.rc|default(0) != 0
with_items: '{{ detect_rubies.results }}'

- name: Detect default ruby version
Expand Down Expand Up @@ -67,9 +67,9 @@
changed_when: False
failed_when: False
register: detect_delete_ruby
when: rvm1_delete_ruby
when: rvm1_delete_ruby | bool

- name: Delete ruby version
command: '{{ rvm1_rvm }} remove {{ rvm1_delete_ruby }}'
changed_when: False
when: rvm1_delete_ruby and detect_delete_ruby.rc == 0
when: rvm1_delete_ruby | bool and detect_delete_ruby.rc == 0