Merge "Use apt_repository update_cache feature"

This commit is contained in:
Jenkins 2016-11-08 20:11:05 +00:00 committed by Gerrit Code Review
commit 9578fa9ee9
2 changed files with 4 additions and 17 deletions

View File

@ -29,6 +29,7 @@
apt_repository:
repo: "{{ novalink_repo.repo }}"
state: "{{ novalink_repo.state }}"
update_cache: yes
register: add_nv_repos
until: add_nv_repos|success
retries: 5
@ -36,16 +37,6 @@
tags:
- novalink-repo
- name: Update apt if needed
apt:
update_cache: yes
when: add_nv_repos|changed
tags:
- nova-apt-packages
- nova-compute-powervm-apt-packages
# do not trigger ANSIBLE0016
- skip_ansible_lint
- name: Install apt packages
apt:
pkg: "{{ item }}"

View File

@ -17,6 +17,8 @@
apt:
pkg: ubuntu-cloud-keyring
state: "{{ nova_package_state }}"
update_cache: yes
cache_valid_time: "{{ cache_timeout }}"
when: nova_uca_enable
register: nova_uca_add_keys
tags:
@ -26,6 +28,7 @@
apt_repository:
repo: "{{ uca_repo }}"
state: present
update_cache: yes
register: nova_uca_add_repo
when: nova_uca_enable
until: add_repo|success
@ -34,13 +37,6 @@
tags:
- add-uca-repo
- name: Update apt if needed
apt:
update_cache: yes
when: nova_uca_add_keys | changed or nova_uca_add_repo | changed
tags:
- nova-apt-packages
- name: Install apt packages (common)
apt:
pkg: "{{ item }}"