Document time format idiosyncrasies

This commit is contained in:
Daniel A. Wozniak 2018-08-08 21:42:46 +00:00
parent b87bf905c2
commit 313a3d93d6
No known key found for this signature in database
GPG key ID: 166B9D2C06C82D61

View file

@ -1845,6 +1845,15 @@ def add_trigger(name=None,
- SessionLock: When the workstation is locked
- SessionUnlock: When the workstation is unlocked
.. note::
Arguments are parsed by the YAML loader and are subject to yaml's
idiosyncrasies. Therefore, time values in some formats (``%H:%M:%S`` and
``%H:%M``) should to be quoted. See `YAML IDIOSYNCRASIES`_ for more details.
.. _`YAML IDIOSYNCRASIES`: https://docs.saltstack.com/en/latest/topics/troubleshooting/yaml_idiosyncrasies.html#time-expressions
:return: True if successful, False if unsuccessful
:rtype: bool
@ -1852,7 +1861,7 @@ def add_trigger(name=None,
.. code-block:: bash
salt 'minion-id' task.add_trigger <task_name> trigger_type=Once trigger_enabled=True start_date=2016/12/1 start_time=12:01
salt 'minion-id' task.add_trigger <task_name> trigger_type=Once trigger_enabled=True start_date=2016/12/1 start_time='"12:01"'
'''
if not trigger_type:
return 'Required parameter "trigger_type" not specified'