Skip to content

Commit

Permalink
style: replace default with d
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjelinek authored and richm committed Feb 7, 2024
1 parent f050d22 commit 47ec1d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions tasks/shell_pcs/check-and-prepare-role-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@
- name: Parse pcsd capabilities
set_fact:
__ha_cluster_pcsd_capabilities: "{{
(__ha_cluster_pcsd_version.stdout_lines[1] | default('')).split()
}}"
(__ha_cluster_pcsd_version.stdout_lines[1] | d('')).split() }}"

# The capability got released in RHEL 8.3, which is currently the oldest
# release supported by the role. Therefore, support for pcs without the
Expand Down
8 changes: 4 additions & 4 deletions tasks/shell_pcs/create-and-push-cib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
## Node attributes
- name: Configure node attributes
include_tasks: pcs-node-attributes.yml
loop: "{{ ha_cluster_node_options | default([]) |
selectattr('attributes', 'defined') | list }}"
loop: "{{ ha_cluster_node_options | selectattr('attributes', 'defined') |
list }}"
loop_control:
loop_var: node_options

Expand All @@ -111,7 +111,7 @@
include_tasks: pcs-rsc-op-defaults.yml
vars:
operations: false
loop: "{{ ha_cluster_resource_defaults.meta_attrs | default([]) }}"
loop: "{{ ha_cluster_resource_defaults.meta_attrs | d([]) }}"
loop_control:
index_var: defaults_set_index
loop_var: defaults_set
Expand All @@ -124,7 +124,7 @@
vars:
operations: true
loop: "{{
ha_cluster_resource_operation_defaults.meta_attrs | default([]) }}"
ha_cluster_resource_operation_defaults.meta_attrs | d([]) }}"
loop_control:
index_var: defaults_set_index
loop_var: defaults_set
Expand Down

0 comments on commit 47ec1d2

Please sign in to comment.