LoginSignup
9
7

More than 5 years have passed since last update.

zabbix3.0(server/agent)のansible-playbookを作ってみた(その2)

Last updated at Posted at 2017-05-27

2017/09/03追記

Zabbix3.4のansible-playbookも作ってみた。

shell
git clone https://github.com/mishikawan/zabbix34-ansible.git

目的

2回目のAnsible用playbookの挑戦結果です。
CentOS7環境に、Zabbix-server(rpm)とZabbix-agent(rpm)の機能を自動設定する。

一回目の記事(zabbix3.0のansible-playbookを作ってみた)はこちら。

アウトプット

作成したplaybookを githubに登録してみた。
git clone https://github.com/mishikawan/zabbix30-ansible.git

興味があれば、git-cloneしてみてください。

内容

  • os(共通(common))

    • selinux無効化
    • timezoneの設定(zone情報指定可能)
    • chrony(時刻同期先IP指定可能)
    • zabbix-repoの登録
  • zabbix-server

    • zabbix3.0(zabbix official repo)
    • mariadb( DB名"zabbix"のユーザ"zabbix"のパスワード指定可能)
    • httpd
    • snmptrapd( snmptrapの受付コミュニティ名指定可能)
    • snmptt(epel repo)
  • zabbix-agent

    • zabbix-agent3.0( zabbix-serverのIP指定可能)

playbook実行

ansibleサーバで以下を実行

git clone https://github.com/mishikawan/zabbix30-ansible.git
cd zabbix30-ansible/
ansible-playbook -i zabbix30/inventory/inventory.ini zabbix30/zabbix30_deploy.yml

無事完了すると、zabbixサーバ上でzabbixサーバが稼働しています。以下、URLでアクセス可能。

http://{zabbix-server-ip}/zabbix
  ID = Admin
  PASS = zabbix
9
7
2

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
9
7