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.sh
or.py
script that can be executed; if missing, theopensips-cli
tool is executedmi_ip
: optional, the IP to the OpenSIPS http MI listener; if missing,127.0.0.1
is usedmi_port
: optional, the port to the OpenSIPS http MI listener; if missing,8888
is usedmi_path
: optional, the path to the OpenSIPS http MI listener; if missing,mi
is usedconfig_file
: optional configuration file with default settings that is passed toopensips-cli
as the-f
parameteroptions
: a list of key-value pairs that are passed toopensips-cli
with-o
parameter
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