Skip to content

Commit

Permalink
proper conditional checks (#82)
Browse files Browse the repository at this point in the history
* proper check of a boolean, handling all cases (like undefined var and --extra-vars mesos_apt_pin_priority=false|true cases)

* fix when check to properly handle --extra-vars mesos_agent_meta_cleanup=false
  • Loading branch information
lhoss authored and ernestas-poskus committed Feb 19, 2018
1 parent 27b7829 commit 467d9ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
file: path="{{mesos_work_dir}}/meta/slaves/latest" state=absent
when:
- mesos_install_mode == "slave" or mesos_install_mode == "master-slave"
- mesos_agent_meta_cleanup
- mesos_agent_meta_cleanup | bool

# i.e. upgrade mesos, templates stay the same...
- name: Restart mesos-master
Expand Down
2 changes: 1 addition & 1 deletion tasks/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
template:
src: mesos.pref.j2
dest: /etc/apt/preferences.d/mesos.pref
when: mesos_apt_pin_priority is defined
when: mesos_apt_pin_priority | default(false) | bool

- name: Install Debian OS packages
apt: pkg={{ item }} state=present update_cache=yes cache_valid_time=3600
Expand Down

0 comments on commit 467d9ab

Please sign in to comment.