Skip to content

Commit

Permalink
Add default to False to avoid error when variable is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
dabelenda committed Jan 16, 2018
1 parent 474a850 commit 09fa03d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
persistentlocalstorage_classes: "{{ openshift_persistentlocalstorage_classes | default([]) }}"
roles:
- role: openshift_persistentlocalstorage
when: openshift_persistentlocalstorage_enabled | bool
when: openshift_persistentlocalstorage_enabled | default(False) | bool

- name: Create Hosted Resources - Persistent Local Storage Classes
hosts: nodes
Expand Down
2 changes: 1 addition & 1 deletion roles/openshift_master/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ r_openshift_master_data_dir: "{{ r_openshift_master_data_dir_default }}"
r_openshift_master_sdn_network_plugin_name_default: "{{ os_sdn_network_plugin_name | default('redhat/openshift-ovs-subnet') }}"
r_openshift_master_sdn_network_plugin_name: "{{ r_openshift_master_sdn_network_plugin_name_default }}"

openshift_master_use_persistentlocalvolumes: "{{ openshift_persistentlocalstorage_enabled | default(False) }}"
openshift_master_use_persistentlocalvolumes: "{{ openshift_persistentlocalstorage_enabled | default(False) | bool }}"

openshift_master_image_config_latest_default: "{{ openshift_image_config_latest | default(False) }}"
openshift_master_image_config_latest: "{{ openshift_master_image_config_latest_default }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/openshift_node/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,4 @@ openshift_node_image_config_latest: "{{ openshift_node_image_config_latest_defau

openshift_node_use_instance_profiles: False

openshift_node_use_persistentlocalvolumes: "{{ openshift_persistentlocalstorage_enabled | default(False) }}"
openshift_node_use_persistentlocalvolumes: "{{ openshift_persistentlocalstorage_enabled | default(False) | bool }}"

0 comments on commit 09fa03d

Please sign in to comment.