Sending sms through python's twilio module and logging into a mysql database for parsing.
Template: provide simpler string substitutions.
Twilio Library: interaction between the Twilio API and the Python application.
Mysql: standardized database driver for Python platforms and development.
Dockerfile: build an docker image that starts the project.
Playbook: manage the containers with docker_container
module.
Records all SMS sent.
- Build a docker image
docker build -t <container_name> .
2. Create a MySQL database with the following syntax
CREATE TABLE smstable (
id INT AUTO_INCREMENT PRIMARY KEY,
ts TIMESTAMP,
name VARCHAR(30) NOT NULL,
num VARCHAR(30) NOT NULL,
id VARCHAR(9) NOT NULL,
message VARCHAR(250) NOT NULL
);
- Run Ansible playbook.
ansible-paybook /<path>/ansible/playbook.yml