- import_playbook: "/srv/web/infra/ansible/playbooks/include/virt-create.yml"
  vars:
    myhosts: "rabbitmq:rabbitmq_stg"

- name: make the box be real
  hosts: rabbitmq:rabbitmq_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

  pre_tasks:
  - import_tasks: "{{ tasks_path }}/yumrepos.yml"

  roles:
  - base
  - rkhunter
  - nagios_client
  - zabbix/zabbix_agent
  - hosts
  - ipa/client
  - collectd/base
  # RabbitMQ statistics are cluster-wide, only collect them on one member
  - role: collectd/rabbitmq
    when: inventory_hostname.startswith('rabbitmq03.iad2')
  - rsyncd
  - sudo
  - rabbitmq_cluster

  tasks:
  - import_tasks: "{{ tasks_path }}/motd.yml"

  handlers:
  - import_tasks: "{{ handlers_path }}/restart_services.yml"
