at - Schedule the execution of a command or script file via the at command

New in version 1.5.

Synopsis

Requirements

The below requirements are needed on the host that executes this module.

  • at

Parameters

Parameter Choices/Defaults Comments
command
A command to be executed in the future.
count
required
The count of units in the future to execute the command or script file.
script_file
An existing script file to be executed in the future.
state
    Choices:
  • absent
  • present ←
The state dictates if the command or script file should be evaluated as present(added) or absent(deleted).
unique
bool
    Choices:
  • no ←
  • yes
If a matching job is present a new job will not be added.
units
required
    Choices:
  • minutes
  • hours
  • days
  • weeks
The type of units in the future to execute the command or script file.

Examples

- name: Schedule a command to execute in 20 minutes as root.
  at:
    command: ls -d / >/dev/null
    count: 20
    units: minutes

- name: Match a command to an existing job and delete the job.
  at:
    command: ls -d / >/dev/null
    state: absent

- name: Schedule a command to execute in 20 minutes making sure it is unique in the queue.
  at:
    command: ls -d / >/dev/null
    count: 20
    units: minutes
    unique: yes

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Maintenance

This module is flagged as core which means that it is maintained by the Ansible Core Team. See Module Maintenance & Support for more info.

For a list of other modules that are also maintained by the Ansible Core Team, see here.

Support

For more information about Red Hat’s support of this module, please refer to this Knowledge Base article

Author

  • Richard Isaacson (@risaacson)

Hint

If you notice any issues in this documentation you can edit this document to improve it.