mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
* timezone: change warning to debug
Convert warning message to debug when timedatectl found but not usable.
Fixes: #1942
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* add changelog entry
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
(cherry picked from commit 0bd345bfb0)
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
3
changelogs/fragments/1942_timezone.yml
Normal file
3
changelogs/fragments/1942_timezone.yml
Normal file
@@ -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).
|
||||||
@@ -107,7 +107,7 @@ class Timezone(object):
|
|||||||
if rc == 0:
|
if rc == 0:
|
||||||
return super(Timezone, SystemdTimezone).__new__(SystemdTimezone)
|
return super(Timezone, SystemdTimezone).__new__(SystemdTimezone)
|
||||||
else:
|
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)
|
return super(Timezone, NosystemdTimezone).__new__(NosystemdTimezone)
|
||||||
else:
|
else:
|
||||||
return super(Timezone, NosystemdTimezone).__new__(NosystemdTimezone)
|
return super(Timezone, NosystemdTimezone).__new__(NosystemdTimezone)
|
||||||
|
|||||||
Reference in New Issue
Block a user