Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smejdil/freebsd-zabbix-agent
Install and configure Zabbix agent by Ansible on FreeBSD
https://github.com/smejdil/freebsd-zabbix-agent
ansible-playbook freebsd vagrant vagrantfile zabbix-agent
Last synced: 22 days ago
JSON representation
Install and configure Zabbix agent by Ansible on FreeBSD
- Host: GitHub
- URL: https://github.com/smejdil/freebsd-zabbix-agent
- Owner: smejdil
- License: gpl-3.0
- Created: 2021-05-25T10:30:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-21T09:41:08.000Z (almost 3 years ago)
- Last Synced: 2024-11-10T13:46:41.938Z (3 months ago)
- Topics: ansible-playbook, freebsd, vagrant, vagrantfile, zabbix-agent
- Homepage: http://www.open-tech.cz/
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## FreeBSD Zabbix Agent
This small project is used for install zabbix_agent[5|6] on OS FreeBSD 13
## Dependencies
- Package on desktop - vagrant - 2.2.6+dfsg-2ubuntu3 Tool for building and distributing virtualized development environments
- Package on desktop - ansible - 2.9.6+dfsg-1 - Configuration management, deployment, and task execution system## How it works
On Linux desktop run vagrant with VirtualBox. For test install and configure zabbix_agent by ansible on FreeBSD 13
### Installation test evnviroment FreeBSD
```console
vagrant up
vagrant ssh
```
- Vagrant also configure sshd - PermitRootLogin yes and set up root password and install ansible package### Installation Desktop
- install ssh public key to FreeBSD
```console
cd ~/.ssh && ssh-copy-id -i id_rsa.pub [email protected]
cd ${HOME}/work/freebsd-zabbix-agent
```
- test Ansible communication
```console
ansible "*" -i "192.168.42.100," -u root -m ping
192.168.42.100 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/local/bin/python3.7"
},
"changed": false,
"ping": "pong"
}
```
### Configure ansible on Desktop```console
sudo vim /etc/ansible/hosts[fbsd-vagrant]
freebsd ansible_ssh_host=192.168.42.100 ansible_ssh_user=rootansible fbsd-vagrant -m ping
```
Use Ansible community collection general and pkgng module- https://docs.ansible.com/ansible/latest/collections/community/general/index.html#plugins-in-community-general
- https://docs.ansible.com/ansible/latest/collections/community/general/pkgng_module.html## Install Ansible module
```console
ansible-galaxy collection install community.general
or
ansible-galaxy collection install -r requirements.yml
```## Run Ansible playbook with enviroment
```console
ansible-playbook zabbix-agent.yml --extra-vars "ansible_fqdn=freebsd zabbix_server=zabbix.pfsense.cz"
```### ToDo
- Install and configure zabbix_server