2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Zabbixインストール用Ansible Playbook(EC2)

Last updated at Posted at 2022-12-16

内容

ZABBIXを一発でインストールするAnsible playbookです。環境はAlmalinux 8 & ZABBIX 5です。少し前に作成したものなのでAlmalinux 9ZABBIX 6は試しておりません。

EC2準備

  • Almalinux OS 8(x86_64)を選択
  • セキュリティグループでssh(22)とhttp(80)を開ける
  • パブリックIP割当有効化

スクリーンショット 2022-12-16 16.45.28.png

Ansible準備

Ansibleインストール

sudo su -
dnf update
dnf install epel-release
dnf module install python39
alternatives --config python
dnf install ansible
ansible --version

鍵の設定

vim /home/ec2-user/.ssh/key.pem # 秘密鍵の情報を貼付け
chmod 400 /home/ec2-user/.ssh/key.pem

Playbook準備

git clone https://github.com/Toru-Kubota/zabbix-server-install.git
cd zabbix-server-install
vim inventory.ini
  • 下記を追加する。
inventory.ini
[zabbix_servers:vars]
ansible_ssh_user=ec2-user
ansible_ssh_private_key_file=/home/ec2-user/.ssh/key.pem

Ansible実行

Playbook実行

ansible-playbook -i inventory.ini Zabbix-Server-Setting.yml

画面確認

http://ip/zabbixにアクセスして続きをやります。

スクリーンショット 2022-12-16 16.43.24.png

2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?