- name: Install monasca keystone roles and endpoint on a keystone host
  hosts: keystone_host
  sudo: yes
  roles:
    - {role: monasca-keystone, tags: [keystone]}

- name: Installs the Monasca DBs, kafka and other core dependencies
  hosts: monasca
  sudo: yes
  serial: 1  # Prevents more than one box from restarting at a time.
  tasks:
    - name: Install postfix, needed by notification engine
      apt: name=postfix state=present
    - name: Install python setup tools
      apt: name=python-setuptools state=present
    - name: Install pip from easy_install
      easy_install: name=pip
    - name: Install packages to allow pip to compile extensions as needed
      apt: name={{item}} state=present
      with_items:
        - python-dev
        - libssl-dev
        - libcrypto++-dev
  roles:
    - {role: zookeeper, tags: [zookeeper]}
    - {role: kafka, tags: [kafka]}
    - {role: influxdb, tags: [influxdb]}
    - {role: percona, when: mysql_install_on_monasca, tags: [mysql, percona]}

- name: Install monasca keystone roles and endpoint into keystone
  hosts: monasca_master
  sudo: yes
  roles:
    - {role: monasca-keystone, tags: [keystone]}

- name: Installs the Monasca DBs, kafka and other core dependencies
  hosts: monasca
  sudo: yes
  serial: 1  # Prevents more than one box from restarting at a time.
  tasks:
    - name: Install postfix, needed by notification engine
      apt: name=postfix state=present
    - name: Install python setup tools
      apt: name=python-setuptools state=present
    - name: Install pip from easy_install
      easy_install: name=pip
    - name: Install packages to allow pip to compile extensions as needed
      apt: name={{item}} state=present
      with_items:
        - python-dev
        - libssl-dev
        - libcrypto++-dev
  roles:
    - {role: zookeeper, tags: [zookeeper]}
    - {role: kafka, tags: [kafka]}
    - {role: influxdb, tags: [influxdb]}
    - {role: percona, when: mysql_install_on_monasca, tags: [mysql, percona]}

Move the keystone task to the monasca_master node since it can run anywhere. Makes it easier to reuse an existing keystone
Move the keystone task to the monasca_master node since
it can run anywhere. Makes it easier to reuse an existing
keystone
