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

Support for "exact_time" option in ansible.posix.at module

Open LeKSuS-04 opened this issue 1 year ago • 3 comments

SUMMARY

Support for exact_time option in ansible.posix.at module

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

ansible.posix.at

ADDITIONAL INFORMATION

This would allow users to schedule commands to be executed at specific time, instead of using N <units> from now. The example below shows example of using this module in task with this feature. exact_time option might be implemented to work with dates and convert them into right format inside the module, but I think that's not that important for the sake of example, so I just used the exact format at expects you to pass (see -t option in at manual)

- name: Run command exactly at 12:00:00, 31 Jan 2023
  ansible.posix.at:
    command: ls -d / >/dev/null
    exact_time: '202301311200.00'
    state: present
    unique: true

LeKSuS-04 avatar Jun 09 '23 08:06 LeKSuS-04

this is already being discussed (including a solution) in issue 326. Unfortunately it has not made any progress in terms of producing a PR.

dulhaver avatar Jul 29 '23 15:07 dulhaver

This is a necessary feature. And exact_time is not very accurate, because if you see schedule due time, usually it has a few seconds lag on that host. maybe run_at is suitable

Jovons avatar Aug 09 '23 02:08 Jovons

this is already being discussed (including a solution) in issue 326. Unfortunately it has not made any progress in terms of producing a PR.

I saw it on https://docs.ansible.com/ansible/devel/community/contributing_maintained_collections.html#ansible-maintained-collections, Open to PRs. but I cannot find a way to pull request and commit any PR?

Jovons avatar Aug 09 '23 02:08 Jovons