diff --git a/changelogs/fragments/1942_timezone.yml b/changelogs/fragments/1942_timezone.yml new file mode 100644 index 0000000000..349c263298 --- /dev/null +++ b/changelogs/fragments/1942_timezone.yml @@ -0,0 +1,3 @@ +--- +minor_changes: +- timezone - print error message to debug instead of warning when timedatectl fails (https://github.com/ansible-collections/community.general/issues/1942). diff --git a/plugins/modules/system/timezone.py b/plugins/modules/system/timezone.py index 3cb7601441..27dfc9a98d 100644 --- a/plugins/modules/system/timezone.py +++ b/plugins/modules/system/timezone.py @@ -107,7 +107,7 @@ class Timezone(object): if rc == 0: return super(Timezone, SystemdTimezone).__new__(SystemdTimezone) else: - module.warn('timedatectl command was found but not usable: %s. using other method.' % stderr) + module.debug('timedatectl command was found but not usable: %s. using other method.' % stderr) return super(Timezone, NosystemdTimezone).__new__(NosystemdTimezone) else: return super(Timezone, NosystemdTimezone).__new__(NosystemdTimezone)