---
- name: install ubuntu-cloud-keyring(ubuntu)
  apt: name={{ item }} state=latest
  with_items:
    - ubuntu-cloud-keyring

- name: add juno cloudarchive
  apt_repository: repo={{ juno_cloud_archive }} state=present

- name: update packages once
  apt: update_cache=yes 

- name: update hosts files to all hosts
  template: src=hosts
            dest=/etc/hosts
            backup=yes

- name: install common packages
  apt: name={{ item }} state=latest
  with_items:
    - python-pip
    - python-dev
    - python-mysqldb
    - ntp

- name: update ntp conf
  template: src=ntp.conf dest=/etc/ntp.conf backup=yes
  notify:
    - restart ntp

- name: update pip
  pip: name={{ item }} state=latest
  with_items:
    - pip


---
- name: first update pkgs
  apt: update_cache=yes

- name: install ubuntu-cloud-keyring(ubuntu)
  apt: name={{ item }} state=latest
  with_items:
    - ubuntu-cloud-keyring

- name: add juno cloudarchive
  apt_repository: repo="{{ juno_cloud_archive }}" state=present

- name: update packages once
  apt: update_cache=yes 

- name: update hosts files to all hosts
  template: src=hosts
            dest=/etc/hosts
            backup=yes

- name: install common packages
  apt: name={{ item }} state=latest
  with_items:
    - python-pip
    - python-dev
    - python-mysqldb
    - ntp

- name: update ntp conf
  template: src=ntp.conf dest=/etc/ntp.conf backup=yes
  notify:
    - restart ntp

- name: update pip
  pip: name={{ item }} state=latest
  with_items:
    - pip


Fix bugs in ansible common role
Fix bugs in ansible common role

Change-Id: I83e84aa79b97fd6a10bbd9e16c1dc1927ce4063f
