---
- hosts: compute
  remote_user: "{{ host_remote_user }}"
  become: true
  roles:
    - compute

- hosts: controller
  remote_user: "{{ host_remote_user }}"
  become: true
  roles:
    - nova
    - neutron
    - keystone
    - ceilometer
    - cinder
    - mysql
    - rabbitmq

- hosts: undercloud
  remote_user: "{{ local_remote_user }}"
  become: true
  roles:
    - undercloud


- hosts: localhost
  become: true
  tasks:
  - name: Dump all vars
    local_action: template src=dump_facts.j2 dest={{ browbeat_path }}/metadata/machine_facts.json
  - name: Generate metadata jsons
    shell : python {{ browbeat_path }}/lib/Metadata.py {{ browbeat_path }}/metadata

---
- hosts: compute
  remote_user: "{{ host_remote_user }}"
  become: true
  roles:
    - compute

- hosts: controller
  remote_user: "{{ host_remote_user }}"
  become: true
  roles:
    - nova
    - neutron
    - keystone
    - ceilometer
    - cinder
    - mysql
    - rabbitmq

- hosts: undercloud
  remote_user: "{{ local_remote_user }}"
  become: true
  roles:
    - undercloud


- hosts: localhost
  tasks:
  - name: Dump all vars
    local_action: template src=dump_facts.j2 dest={{ browbeat_path }}/metadata/machine_facts.json
  - name: Generate metadata jsons
    shell : python {{ browbeat_path }}/lib/Metadata.py {{ browbeat_path }}/metadata

Fix sudo requirement for localhost
Fix sudo requirement for localhost

All roles in this playbook previously had
become: true, which requires sudo permissions
the localhost task, running the metadata.py file
do not require root. When being run from the undercloud
this is not major issue as the undercloud and locahost
are the same and passwordless ssh exists on both.

But when running Ansible/Browbeat remotely this will
require root permissions unnessicarily.

Change-Id: I71e97348dcce25ebb9ec2aa9a00fce516315177c
