---
- name: create heat user
  user: name=heat comment=heat shell=/bin/false system=yes home=/nonexistent createhome=no

- name: get heat source repo
  git: |
    repo={{ openstack.git_mirror }}/heat.git
    dest=/opt/stack/heat
    version={{ heat.rev }}
    update={{ openstack.git_update }}
  notify:
    - pip install heat
- meta: flush_handlers

- name: create heat config directory
  file: dest=/etc/heat state=directory

- name: create heat environment.d directory
  file: dest=/etc/heat/environment.d state=directory

- name: create heat log directory
  file: dest=/var/log/heat state=directory mode=0755 owner=heat

- name: heat config
  template: src=etc/heat/heat.conf dest=/etc/heat/heat.conf mode=0644

- name: heat policy config
  template: src=etc/heat/policy.json dest=/etc/heat/policy.json mode=0644

- name: heat paste config
  template: src=etc/heat/api-paste.ini dest=/etc/heat/api-paste.ini mode=0644

- name: install heat services
  upstart_service:
    name={{ item }}
    user=heat
    cmd=/usr/local/bin/{{ item }}
  with_items:
    - heat-api
    - heat-api-cfn
    - heat-engine

- name: start heat services
  service: name={{ item }} state=started
  with_items:
    - heat-api
    - heat-api-cfn
    - heat-engine

---
- name: create heat user
  user: name=heat comment=heat shell=/bin/false system=yes home=/nonexistent
        createhome=no

- name: get heat source repo
  git: repo={{ openstack.git_mirror }}/heat.git
       dest=/opt/stack/heat
       version={{ heat.rev }}
       update={{ openstack.git_update }}
  notify:
    - pip install heat

- meta: flush_handlers

- name: create heat environment.d directory
  file: dest=/etc/heat/environment.d state=directory

- name: create heat log directory
  file: dest=/var/log/heat state=directory mode=0755 owner=heat

- name: heat config
  template: src=etc/heat/heat.conf dest=/etc/heat/heat.conf mode=0644

- name: heat policy config
  template: src=etc/heat/policy.json dest=/etc/heat/policy.json mode=0644

- name: heat paste config
  template: src=etc/heat/api-paste.ini dest=/etc/heat/api-paste.ini mode=0644

- name: install heat services
  upstart_service: name={{ item }}
                   user=heat
                   cmd=/usr/local/bin/{{ item }}
  with_items:
    - heat-api
    - heat-api-cfn
    - heat-engine

- name: start heat services
  service: name={{ item }} state=started
  with_items:
    - heat-api
    - heat-api-cfn
    - heat-engine

Clean up of heat role
Clean up of heat role

whitespace, use file's ability to make parent dirs
