Skip to content

Commit

Permalink
Fixes bare variables in conditionals (deprecation warnings with Ansib…
Browse files Browse the repository at this point in the history
…le 2.8+)
  • Loading branch information
jljouannic authored and pkuczynski committed Jul 12, 2019
1 parent 66b8925 commit deb1d3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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

0 comments on commit deb1d3e

Please sign in to comment.