ansible.posix
ansible.posix copied to clipboard
Support for "exact_time" option in ansible.posix.at module
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
this is already being discussed (including a solution) in issue 326. Unfortunately it has not made any progress in terms of producing a PR.
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
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?