Skip to content

Instantly share code, notes, and snippets.

#! /bin/bash
export DEBIAN_FRONTEND=noninteractive
debconf-set-selections <<< 'mariadb-server mysql-server/root_password password {{ mariadb_root_password }}'
debconf-set-selections <<< 'mariadb-server mysql-server/root_password_again password {{ mariadb_root_password }}'
---
- name: Copy the MariaDB root non-interactive password
template: src=mariadb_non_interactive_password.sh.j2 dest=/tmp/mariadb_non_interactive_password.sh owner=root group=root mode=0700
- name: Execute the MariaDN root non-interactive password file
shell: /tmp/mariadb_non_interactive_password.sh
- name: Delete the non-interactive password file
file: path=/tmp/mariadb_non_interactive_password.sh state=absent
---
#- name: Copy the MariaDB root non-interactive password
# template: src=mariadb_non_interactive_password.sh.j2 dest=/tmp/mariadb_non_interactive_password.sh owner=root group=root mode=0700
#
#- name: Execute the MariaDB root non-interactive password file
# shell: /tmp/mariadb_non_interactive_password.sh
#
#- name: Delete the MariaDB non-interactive password file
# file: path=/tmp/mariadb_non_interactive_password.sh state=absent
- name: Set Debconf root_password
SUBSYSTEM=="usb", SYSFS{idProduct}=="1446", SYSFS{idVendor}=="12d1", RUN+="/lib/udev/usb_modeswitch --vendo 0x12d1 --product 0x1446 --type option-zerocd"
SUBSYSTEMS=="usb", ATTRS{modalias}=="usb:v12D1p1003*", KERNEL=="ttyUSB*", ATTRS{bInterfaceNumber}=="00", ATTRS{bInterfaceProtocol}=="ff", NAME="ttyUSB_utps_modem"
SUBSYSTEMS=="usb", ATTRS{modalias}=="usb:v12D1p1003*", KERNEL=="ttyUSB*", ATTRS{bInterfaceNumber}=="01", ATTRS{bInterfaceProtocol}=="ff", NAME="ttyUSB_utps_pcui"
cat /etc/passwd | grep kannel
ls -l /dev/ | grep ttyUSB_utps_pcui
crw-rw---- 1 root dialout 188, 1 Jan 18 12:40 ttyUSB_utps_pcui
crw-rw---- 1 root dialout 188, 1 Jan 18 12:40 ttyUSB_utps_pcui
sudo usermod -a -G dialout kannel
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = p@ssw0rd
admin-deny-ip = "*.*.*.*"
admin-allow-ip = "127.0.0.1"
#wapbox-port = 13002
#wdp-interface-name = "*"
log-file = "/var/log/kannel/kannel.log"
log-level = 0
#group configures interfacing
group = smsc
smsc = at
modemtype = auto
device = /dev/ttyUSB_utps_pcui
my-number = +254723572302
sms-center = +254722500029
connect-allow-ip = 127.0.0.1
log-level = 0
include = /etc/kannel/modems.conf