https://github.com/wesleych3n/ntu-iot-server
NTU BBALB dairy cow face monitoring project. Server setting.
https://github.com/wesleych3n/ntu-iot-server
ansible automation docker-compose grafana influxdb k3s mqtt telegraf wireguard
Last synced: 3 months ago
JSON representation
NTU BBALB dairy cow face monitoring project. Server setting.
- Host: GitHub
- URL: https://github.com/wesleych3n/ntu-iot-server
- Owner: WesleyCh3n
- License: mit
- Created: 2021-08-31T04:40:55.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-30T10:31:49.000Z (over 4 years ago)
- Last Synced: 2025-10-25T04:50:33.269Z (8 months ago)
- Topics: ansible, automation, docker-compose, grafana, influxdb, k3s, mqtt, telegraf, wireguard
- Language: Shell
- Homepage:
- Size: 7.24 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.init.ansible.md
- License: LICENSE
Awesome Lists containing this project
README
# Ansible Installation
[](https://github.com/WesleyCh3n/NTU-IoT-Server) [](https://hackmd.io/MEZ7JLrfQ12e8LU3UdwsBQ)

## Installation
Using python virtual environment (`virtualenv`).
```bash
python3 -m virtualenv ansible # Create a virtualenv
source ansible/bin/activate # Activate the virtual environment
python3 -m pip3 install ansible
```
## Preparation
### `ansible.cfg`
```cfg
[defaults]
inventory = ./host_vars/hosts.ini # TODO: select host path
stdout_callback = yaml
bin_ansible_callbacks = True
host_key_checking = False
```
### `host_vars/hosts.ini`
- TODO: replace the node host ip and the correct path of ssh key for ssh into node.
```cfg
[node]
NODE01 NUM=01 ansible_host=10.112.0.2 ansible_user=pi ansible_ssh_private_key_file=
NODE02 NUM=02 ansible_host=10.112.0.3 ansible_user=pi ansible_ssh_private_key_file=
NODE03 NUM=03 ansible_host=10.112.0.4 ansible_user=pi ansible_ssh_private_key_file=
NODE04 NUM=04 ansible_host=10.112.0.8 ansible_user=pi ansible_ssh_private_key_file=
NODE05 NUM=05 ansible_host=10.112.0.9 ansible_user=pi ansible_ssh_private_key_file=
[all:vars]
ansible_python_interpreter=/usr/bin/python3
```
### `host_vars/vars.yml`
```yaml
version: "4.0.3" # ntu-iot-node program version
# you can add your variable as you widh
```
###### tags: `ansible`