Skip to content

Commit

Permalink
Merge pull request #935 from berndfinger/issue-934
Browse files Browse the repository at this point in the history
sap_general_preconfigure: Fix check mode
  • Loading branch information
berndfinger authored Jan 23, 2025
2 parents c186f3e + 8e13a6c commit 0c6cd33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions roles/sap_general_preconfigure/tasks/sapnote/2369910.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,21 @@
- sap_general_preconfigure_configure_locale
block:
- name: Configure an English locale
ansible.builtin.command: "localectl set-locale LANG={{ sap_general_preconfigure_default_locale }}"
changed_when: true
when:
- sap_general_preconfigure_default_locale is defined and sap_general_preconfigure_default_locale
- sap_general_preconfigure_default_locale == 'C.UTF-8' or
sap_general_preconfigure_default_locale == 'C.utf8' or
sap_general_preconfigure_default_locale.startswith('en_') and
(sap_general_preconfigure_default_locale.endswith('UTF-8') or
sap_general_preconfigure_default_locale.endswith('utf8'))
ansible.builtin.command: "localectl set-locale LANG={{ sap_general_preconfigure_default_locale }}"
changed_when: true

- name: Get the current default locale
ansible.builtin.command: awk '{gsub("\"","")}/^LANG=/&&(/=C\./||/=en_/)&&(/utf8$/||/UTF-8$/){print}' /etc/locale.conf
changed_when: false
check_mode: false
register: __sap_general_preconfigure_current_default_locale
changed_when: false

- name: Assert that an English locale is the default
ansible.builtin.assert:
Expand Down
2 changes: 1 addition & 1 deletion roles/sap_ha_pacemaker_cluster/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@

# Save all the constructed cluster parameters into a vars file.
#
# This will help re-using ha_cluster afterwards without losing the already
# This will help reusing ha_cluster afterwards without losing the already
# configured resources and constraints.
# The ha_cluster role will otherwise remove configuration that is not part
# of the parameters provided during any subsequent run outside of the current
Expand Down

0 comments on commit 0c6cd33

Please sign in to comment.