Added apt update tasks to everything using apt

This change adds a specific update task to all tasks that all the
apt ansible module. This change was done to ensure that the cache
is updated as expected when instructed to do so. The reason that
the cache update is being removed from the grouping is because
there is an upstream bug that is effecting the process by which
the apt cache is updated when there is a package list to process
within the same task. The work around to make this function as
expected is to move the update into its own task without a package
list.

Upstream Ansible bug:
  - https://github.com/ansible/ansible-modules-core/issues/1497

Change-Id: Ic06d89a76d772c12888b4bc4bbf147be58b0c150
Related-Bug: 1464771
This commit is contained in:
kevin 2015-06-13 16:34:05 -05:00
parent 1e7d433d98
commit 59381b51ff
22 changed files with 246 additions and 45 deletions

View File

@ -13,12 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- galera-client-apt-packages
- name: Install galera packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5

View File

@ -23,12 +23,21 @@
tags:
- galera-debconf
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- galera-apt-packages
- name: Install galera packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5

View File

@ -13,12 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- galera-apt-packages
- name: Install galera pre packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5

View File

@ -13,12 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- haproxy-apt-packages
- name: Install HAPRoxy Packages
apt:
pkg: "{{ item }}"
state: present
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5

View File

@ -13,19 +13,28 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- lxc-apt-packages
- name: Install apt packages
apt:
pkg: "{{ item }}"
state: present
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5
delay: 2
with_items: lxc_apt_packages
tags:
- lxc-packages
- lxc-apt-packages
# The functionality with changing the container cache has been added into the
# upstream LXC templates with patch [ https://github.com/lxc/lxc/pull/558 ]

View File

@ -13,12 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- memcached-apt-packages
- name: Install apt packages
apt:
pkg: "{{ item }}"
state: present
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5

View File

@ -13,16 +13,25 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- openstack-apt-packages
- name: Install host packages
apt:
pkg: "{{ item }}"
state: present
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5
delay: 2
with_items: openstack_host_apt_packages
tags:
- openstack-host-packages
- openstack-apt-packages

View File

@ -13,12 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- cinder-apt-packages
- name: Install apt packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5

View File

@ -13,12 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- glance-apt-packages
- name: Install apt packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5

View File

@ -13,12 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- heat-apt-packages
- name: Install apt packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5

View File

@ -13,12 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- horizon-apt-packages
- name: Install apt packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5

View File

@ -13,12 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- keystone-apt-packages
- name: Install apt packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5

View File

@ -13,12 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- neutron-apt-packages
- name: Install apt packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5

View File

@ -13,12 +13,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- nova-apt-packages
- nova-compute-kvm-apt-packages
- name: Install apt packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5

View File

@ -13,12 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- nova-apt-packages
- name: Install apt packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5

View File

@ -13,17 +13,28 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- nova-apt-packages
- nova-spice-apt-packages
- name: Install apt packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5
delay: 2
with_items: nova_spice_apt_packages
tags:
- nova-apt-packages
- nova-spice-apt-packages

View File

@ -13,12 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- swift-apt-packages
- name: Install apt packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5

View File

@ -13,12 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- rabbitmq-apt-packages
- name: Install apt packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5

View File

@ -13,11 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- repo-apt-packages
- name: Install apt packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
register: install_packages
until: install_packages|success
retries: 5

View File

@ -25,12 +25,21 @@
tags:
- rsyslog-client-apt-repositories
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- rsyslog-client-apt-packages
- name: Install rsyslog packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5

View File

@ -25,12 +25,21 @@
tags:
- rsyslog-apt-repositories
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- rsyslog-apt-packages
- name: Install rsyslog packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5

View File

@ -22,12 +22,20 @@
- { role: "pip_lock_down", tags: [ "utility-pip-lock-down" ] }
- { role: "openstack_openrc", tags: [ "utility-openstack-openrc" ] }
post_tasks:
- name: Update apt sources
apt:
update_cache: yes
cache_valid_time: 600
register: apt_update
until: apt_update|success
retries: 5
delay: 2
tags:
- utility-apt-packages
- name: Install apt packages
apt:
pkg: "{{ item }}"
state: latest
update_cache: yes
cache_valid_time: 600
register: install_packages
until: install_packages|success
retries: 5