From 261ee786c0aa067593b2885029552afcbd7c9546 Mon Sep 17 00:00:00 2001 From: siddharthvipul Date: Tue, 9 Mar 2021 20:14:37 +0530 Subject: [PATCH] add zabbix config playbook for vm Signed-off-by: siddharthvipul --- inventory/inventory | 1 + playbooks/groups/zabbix.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 playbooks/groups/zabbix.yml diff --git a/inventory/inventory b/inventory/inventory index 1b942a01e4..56185471cd 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -713,6 +713,7 @@ vmhost-x86-10.stg.iad2.fedoraproject.org vmhost-x86-11.stg.iad2.fedoraproject.org vmhost-x86-12.stg.iad2.fedoraproject.org wiki01.stg.iad2.fedoraproject.org +zabbix01.stg.iad2.fedoraproject.org # This is a list of hosts that are a little "friendly" with staging. # They are exempted from the iptables wall between staging and prod. diff --git a/playbooks/groups/zabbix.yml b/playbooks/groups/zabbix.yml new file mode 100644 index 0000000000..30260bf41e --- /dev/null +++ b/playbooks/groups/zabbix.yml @@ -0,0 +1,30 @@ +- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=zabbix_stg" + +- name: make the box be real + hosts: zabbix_stg + user: root + gather_facts: True + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + roles: + - base + - rkhunter + - hosts + - { role: fas_client, when: env != "staging" } + - { role: ipa/client, when: env == "staging" } + - collectd/base + - apache + - sudo + + pre_tasks: + - import_tasks: "{{ tasks_path }}/yumrepos.yml" + + tasks: + - import_tasks: "{{ tasks_path }}/motd.yml" + + handlers: + - import_tasks: "{{ handlers_path }}/restart_services.yml"