Skip to content

Commit 1c3cc17

Browse files
Joelgranadosdkruces
authored andcommitted
ansible: Reduce long ansible messages for readability
Signed-off-by: Joel Granados <[email protected]> Reviewed-by: Daniel Gomez <[email protected]>
1 parent bc731be commit 1c3cc17

File tree

1 file changed

+11
-3
lines changed
  • playbooks/roles/bringup_guestfs/tasks

1 file changed

+11
-3
lines changed

playbooks/roles/bringup_guestfs/tasks/main.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
- name: Fail if {{ topdir_path }}/.config is not present
88
fail:
9-
msg: "You have not configured kdevops yet, configure kdevops first."
9+
msg: "kdevops is not confgured. You must run 'make menuconfig'"
1010
when: not config_file.stat.exists or not config_file.stat.isreg
1111
tags: [ 'config-check' ]
1212

@@ -51,7 +51,10 @@
5151

5252
- name: Fail if dnsmasq configuration files exist
5353
fail:
54-
msg: "dnsmasq configuration files or directories still exist. Please remove the following to fully uninstall dnsmasq:\n{{ dnsmasq_config_files | join('\n') }}"
54+
msg: |
55+
dnsmasq configuration files or directories still exist.
56+
Please remove the following to fully uninstall
57+
dnsmasq:\n{{ dnsmasq_config_files | join('\n') }}
5558
when:
5659
- distro_debian_based|bool
5760
- dnsmasq_config_files.results | selectattr('stat.exists') | list | length > 0
@@ -85,7 +88,12 @@
8588

8689
- name: Fail if dnsmasq service is enabled or active
8790
fail:
88-
msg: "dnsmasq service is {{ 'enabled' if dnsmasq_enabled.rc == 0 else 'active' if dnsmasq_active.rc == 0 else 'present' }}. Please ensure dnsmasq is fully uninstalled and disabled. Run 'sudo systemctl disable dnsmasq' and 'sudo systemctl stop dnsmasq' to disable and stop the service."
91+
msg: |
92+
dnsmasq service is
93+
{{ 'enabled' if dnsmasq_enabled.rc == 0 else 'active' if dnsmasq_active.rc == 0 else 'present' }}.
94+
Please ensure dnsmasq is fully uninstalled and disabled.
95+
Run 'sudo systemctl disable dnsmasq' and 'sudo systemctl
96+
stop dnsmasq' to disable and stop the service.
8997
when:
9098
- distro_debian_based|bool
9199
- dnsmasq_config_files | length > 0

0 commit comments

Comments
 (0)