JetPorch is a tool capable of interpreting simple Ansible playbooks.
It can thus be used to install packages, configure, start or stop services as well as execute commands on the gateway.
It is available by default on our gateways. For more information, please refer to https://github.com/jetporch/jetporch_docs.
On Windows, when copy/pasting to a text editor, make sure End Of File (EOF) is configured as Unix-style (LF), or convert it to unix after having created the file on the gateway.
vi myPlaybook.yml
:wq
+Enter to save the fileYour playbook is now ready for execution.
# Standard usage:
jetp myPlaybook.yml
An APT module can be installed thanks to a playbook:
- name: Install the Basic Station package
groups:
- all
tasks:
- !apt
package: basicstation
sd_service
module can be used directly in a playbook:
- name: Enable and Start the Basic Station service
groups:
- all
tasks:
- !sd_service
service: basicstation
enabled: true
restart: true
kconf
module is a Kerlink specific module which standardizes ways to configure network settings.
This example shows how to configure a SIM card with websfr
as default APN and 1234
as PIN code:
- name: Configure network
groups:
- all
tasks:
- !external
use: kconf
params:
ofono:
default_pin: "1234"
default_context:
apn: websfr
See more examples of network configuration in the dedicated page.
In the previous examples, a single 'play' with single 'task' was used at a time.
As explained in JetPorch documentation, it is possible to concatenate several plays in a single playbook.
Here is an example which installs a package with APT, and configures the service with a playbook made of two plays:
- name: Install the Basic Station package
groups:
- all
tasks:
- !apt
package: basicstation
- name: Enable and start the Basic Station service
groups:
- all
tasks:
- !sd_service
service: basicstation
enabled: true
restart: true