---

- name: Install ntp
  apt: name=chrony update_cache=yes cache_valid_time=3600

- name: install software-properties-common
  apt: name=software-properties-common

- name: Add openstack repository
  apt_repository:
    repo: "cloud-archive:liberty"
    update_cache: yes
    state: present

- name: upgrade packages
  apt: update_cache=yes upgrade=dist

- name: Install the OpenStack client
  apt: name=python-openstackclient update_cache=yes cache_valid_time=3600

- name: Create Util directory
  file:
    path: "/opt/local/bin"
    state: directory
    owner: root
    group: root
    mode: 0755

- name: Install OpenStack Utilities script
  copy:
    src: os-utils.sh
    dest: /opt/local/bin/os-utils.sh
    owner: root
    group: root
    mode: 0755

---

- name: Install ntp
  apt: name=chrony update_cache=yes cache_valid_time=3600

- name: install software-properties-common
  apt: name=software-properties-common

- name: enable openstack repository
  command: apt-add-repository cloud-archive:liberty -y

- name: upgrade packages
  apt: update_cache=yes upgrade=dist

- name: Install the OpenStack client
  apt: name=python-openstackclient update_cache=yes cache_valid_time=3600

- name: Create Util directory
  file:
    path: "/opt/local/bin"
    state: directory
    owner: root
    group: root
    mode: 0755

- name: Install OpenStack Utilities script
  copy:
    src: os-utils.sh
    dest: /opt/local/bin/os-utils.sh
    owner: root
    group: root
    mode: 0755

Revert "Use apt_repository to add liberty repo"
Revert "Use apt_repository to add liberty repo"

This reverts commit 845d34a3d08eff4cee8f3e93e5db9b211d489372.

apt_repository to cloud-archive does not work.
