Task used to run a command using the OpenSIPS CLI tool.
The task is able to communicate with one or more OpenSIPS instances using the
OpenSIPS CLI tool over the MI HTTP
interface. It has two different working modes: running a batch command, or
running a script, either with the .sh (executed with bash), either a .py
file (executed with python). You may also provide a custom configuration file
that can be automatically loaded.
The variables overwritten by default by the task are:
image: default image to run isopensips/opensips-cli
Additional settings that can be passed to the task:
script: optional, a path to a.shor.pyscript that can be executed; if missing, theopensips-clitool is executedmi_ip: optional, the IP to the OpenSIPS http MI listener; if missing,127.0.0.1is usedmi_port: optional, the port to the OpenSIPS http MI listener; if missing,8888is usedmi_path: optional, the path to the OpenSIPS http MI listener; if missing,miis usedconfig_file: optional configuration file with default settings that is passed toopensips-clias the-fparameteroptions: a list of key-value pairs that are passed toopensips-cliwith-oparameter
Create a user using the OpenSIPS CLI tool.
- name: Create a User
type: opensips-cli
args: -x user add testing@opensips.org
options:
database_user_url: mysql://opensips:opensipsrw@127.0.0.1/opensips