From b545107be0234c8171ec3c91f1cc3e23acdbd1d8 Mon Sep 17 00:00:00 2001 From: Simon Baerlocher Date: Sun, 18 Feb 2024 14:28:06 +0100 Subject: [PATCH] fix: docs --- roles/chocolatey_packages/meta/argument_specs.yml | 2 +- roles/motd/README.md | 4 +++- roles/motd/defaults/main.yml | 4 +++- roles/motd/meta/argument_specs.yml | 10 +++++++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/roles/chocolatey_packages/meta/argument_specs.yml b/roles/chocolatey_packages/meta/argument_specs.yml index cd1195b..f2d3f22 100644 --- a/roles/chocolatey_packages/meta/argument_specs.yml +++ b/roles/chocolatey_packages/meta/argument_specs.yml @@ -202,7 +202,7 @@ argument_specs: chocolatey_packages_timeout: type: int description: Timeout for the installation process, default is unset. - default: "" + default: 2700 chocolatey_packages_validate_certs: type: bool diff --git a/roles/motd/README.md b/roles/motd/README.md index 65ee90d..6417be1 100644 --- a/roles/motd/README.md +++ b/roles/motd/README.md @@ -20,7 +20,9 @@ Variables defined in `defaults/main.yml` customize the MOTD configuration. These - `motd_distribution_release`: The release name of the distribution. - `motd_virtualization_role`: Role in virtualization (host/guest/none). - `motd_virtualization_type`: Type of virtualization (KVM, VirtualBox, etc.). -- `motd_date_time`: Date and time information. +- `motd_date_time`: Date and time information. This is a dictionary that includes the following suboptions: + - `tz`: The timezone setting. It uses Ansible's built-in `ansible_date_time.tz` to dynamically set the timezone based on the target host's settings. + - `tz_offset`: The timezone offset. It uses Ansible's built-in `ansible_date_time.tz_offset` to dynamically set the timezone offset based on the host's settings. - `motd_region`: Regional variable. - `motd_zone`: Zone variable. - `motd_customer`: Customer variable. diff --git a/roles/motd/defaults/main.yml b/roles/motd/defaults/main.yml index c7b579e..5788e46 100644 --- a/roles/motd/defaults/main.yml +++ b/roles/motd/defaults/main.yml @@ -26,7 +26,9 @@ motd_virtualization_role: "{{ ansible_virtualization_role }}" # Uses Ansible's b motd_virtualization_type: "{{ ansible_virtualization_type }}" # Uses Ansible's built-in virtualization type fact # Date and time information -motd_date_time: "{{ ansible_date_time }}" # Uses Ansible's built-in date time fact +motd_date_time: # Uses Ansible's built-in date time fact to populate timezone and offset + tz: "{{ ansible_date_time.tz }}" # Sets the timezone using Ansible's ansible_date_time fact + tz_offset: "{{ ansible_date_time.tz_offset }}" # Sets the timezone offset using Ansible's ansible_date_time fact # Region variable, undefined by default motd_region: undefined # Custom variable, default set to 'undefined' diff --git a/roles/motd/meta/argument_specs.yml b/roles/motd/meta/argument_specs.yml index c0ccd79..e5dbaa3 100644 --- a/roles/motd/meta/argument_specs.yml +++ b/roles/motd/meta/argument_specs.yml @@ -50,7 +50,15 @@ argument_specs: motd_date_time: description: Date and time information type: dict - default: "{{ ansible_date_time }}" + options: + tz: + description: Timezone of the motd_date_time + type: str + default: "{{ ansible_date_time.tz }}" + tz_offset: + description: Timezone offset of the motd_date_time + type: str + default: "{{ ansible_date_time.tz_offset }}" motd_region: description: Region variable