---
- name: get horizon source repo
  git: |
    repo={{ openstack.git_mirror}}/horizon.git dest=/opt/stack/horizon version={{ horizon.rev }}
  notify:
    - horizon venv
    - restart apache

- apt: pkg={{ item }}
  with_items:
    - python-dev
    - nodejs
    - apache2
    - memcached
    - libapache2-mod-wsgi

- file: dest=/opt/stack/horizon/static state=directory owner=www-data

- template: src=etc/apache2/httpd.conf dest=/etc/apache2/httpd.conf
  notify:
    - restart apache
- template: |
    src=opt/stack/horizon/openstack_dashboard/local/local_settings.py
    dest=/opt/stack/horizon/openstack_dashboard/local/local_settings.py
  notify:
    - restart apache

- name: custom horizon logo
  copy: src=logo.png dest=/opt/stack/horizon/openstack_dashboard/static/dashboard/img/logo.png

- name: custom horizon splash logo
  copy: src=logo.png dest=/opt/stack/horizon/openstack_dashboard/static/dashboard/img/logo-splash.png

- name: custom horizon favicon
  copy: src=favicon.ico dest=/opt/stack/horizon/openstack_dashboard/static/dashboard/img/favicon.ico

- service: name=apache2 state=started

- sensu_process_check: service=apache2

---
- name: get horizon source repo
  git: |
    repo={{ openstack.git_mirror}}/horizon.git dest=/opt/stack/horizon version={{ horizon.rev }}
  notify:
    - horizon venv
    - restart apache

- apt: pkg={{ item }}
  with_items:
    - python-dev
    - nodejs
    - apache2
    - memcached
    - libapache2-mod-wsgi

- file: dest=/opt/stack/horizon/static state=directory owner=www-data

- template: src=etc/apache2/httpd.conf dest=/etc/apache2/httpd.conf
  notify:
    - restart apache
- template: |
    src=opt/stack/horizon/openstack_dashboard/local/local_settings.py
    dest=/opt/stack/horizon/openstack_dashboard/local/local_settings.py
    mode=0644
  notify:
    - restart apache

- name: custom horizon logo
  copy: src=logo.png dest=/opt/stack/horizon/openstack_dashboard/static/dashboard/img/logo.png mode=0644

- name: custom horizon splash logo
  copy: src=logo.png dest=/opt/stack/horizon/openstack_dashboard/static/dashboard/img/logo-splash.png mode=0644

- name: custom horizon favicon
  copy: src=favicon.ico dest=/opt/stack/horizon/openstack_dashboard/static/dashboard/img/favicon.ico

- service: name=apache2 state=started

- sensu_process_check: service=apache2

Fix permissions on horizon conig and custom images.
Fix permissions on horizon conig and custom images.
