ansible.posix icon indicating copy to clipboard operation
ansible.posix copied to clipboard

[at] allow absolute time arguments

Open adlerweb opened this issue 2 years ago • 3 comments

SUMMARY

At the moment at only accepts relative time arguments, for example [count=10, units=hours] for "now + 10 hours". Some users might prefer to use absolute times like "03:00".

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

at

ADDITIONAL INFORMATION
  • Absolute times are supported by at, just not exposed when using the module
  • Example Code: https://github.com/ansible-collections/ansible.posix/compare/main...adlerweb:at_absolute?diff=split
    • Not extensively tested
    • No docs
    • time is directly passed to at. Depending on what you supply as an argument this might break stuff.

adlerweb avatar Sep 09 '21 10:09 adlerweb

H!i thank you for the reporting this issue. For the absolute time setting, if the managed nodes are in different timezones, it may be useful to be able to specify the time in UTC to address use cases where users want to do something at the same time. This is because the absolute time depends on the local time zone setting in each managed node. Also, I think it is necessary to mention this in the document . The local time zone setting in the control node and managed notes can be different.

saito-hideki avatar Sep 13 '21 08:09 saito-hideki

I see, this might be confusing for some people. I've added an option to switch between UTC and local time.

adlerweb avatar Sep 17 '21 12:09 adlerweb