Closed ericzji closed 7 years ago
How is this idempotent?? If I use this resource, the command will be executed every 30 minutes? The example
f5_command { '/Common/tmsh':
tmsh => "tmsh mv cm device bigip1 bigip-a.f5.local",
}
will work on the first run and then fail on all subsequent runs.
For the original design, to execute a TMSH command, you have to: 1) specify an absolute URI, such as /mgmt/tm/cm/device 2) along with JSON body { "command":"mv", "name":"bigip1", "target":"selfdevice2", } both of above are different for different TMSH commands.
The new way of implementation is to simplify, by providing a way to execute native tmsh or bash commands using the REST API (/mgmt/tm/util/bash). All the user has to provide is the exact TMSH or bash command.
Here is an example: (for the same purpose of above: to rename the self device) f5_command { '/Common/tmsh': tmsh => "tmsh mv cm device bigip1 bigip-a.f5.local", }
It's tested, with document updated.