Fix tasks from failing in check_mode

By applying `check_mode: no` to the tasks collecting the current locale
and bash path, those tasks will be executed in the check mode and
subsequent tasks reyling on those won't fail.

See https://docs.ansible.com/ansible/latest/user_guide/playbooks_checkmode.html#enforcing-or-preventing-check-mode-on-tasks
for reference.
main
Moritz 'e1mo' Fromm 3 years ago
parent 2b3a1281ed
commit 7bfaee6e72
Signed by: e1mo
GPG Key ID: 1D5D79A439E787F1

@ -6,6 +6,7 @@
- name: Get current locale and language configuration
command: localectl status
register: locale_status
check_mode: no
changed_when: false
- name: Parse 'LANG' from current locale and language configuration

@ -10,6 +10,7 @@
- name: get bash's path
command: which bash
register: bash_path
check_mode: no
changed_when: false
- name: create user

Loading…
Cancel
Save