ansible / proposals

Repository for sharing and tracking progress on enhancement proposals for Ansible.
Creative Commons Zero v1.0 Universal
93 stars 19 forks source link

at module should allow direct time-of-day specification #124

Closed hymie0 closed 6 years ago

hymie0 commented 6 years ago

Proposal: at module should allow direct time-of-day specification

Author: Eric B Hymowitz <@hymie0>

Date: 2018-07-02

Motivation

The at module allows users to specify a command to be run a specific number of minutes/hours/days/weeks in the future. However, the underlying at command allows (and arguably more often uses) a specific day/date/time to be chosen instead of a time delta in the future.

Problems

Solution proposal

These are just examples. Although I prefer the first two examples (timespec / optional dayspec), I have no specific belief that one method is better or more useful or easier to implement than any other

- name: Schedule a command to execute at 2300 this evening
  at:
    command: ls -d / >/dev/null
    timespec: 2300

- name: Schedule a command to execute at 2300 tomorrow
  at:
    command: ls -d / >/dev/null
    timespec: 2300
    dayspec: tomorrow

- name: Schedule a command to execute at 2300 on the specified date
  at:
    command: ls -d / >/dev/null
    timespec: 201807012300

- name: Schedule a command to execute at 2300 on the specified date
  at:
    command: ls -d / >/dev/null
    timespec: 2018-07-01T23:00
sivel commented 6 years ago

Please open a "Feature Idea" issue in the ansible/ansible repo. No need for a proposal for this type of functionality.