Merge "Ubuntu: update Apt cache before package installation"
This commit is contained in:
commit
c60846507e
@ -11,6 +11,8 @@
|
||||
package:
|
||||
name: ipmitool
|
||||
state: present
|
||||
cache_valid_time: "{{ apt_cache_valid_time if ansible_os_family == 'Debian' else omit }}"
|
||||
update_cache: "{{ True if ansible_os_family == 'Debian' else omit }}"
|
||||
become: True
|
||||
run_once: True
|
||||
delegate_to: "{{ controller_host }}"
|
||||
|
6
ansible/group_vars/all/apt
Normal file
6
ansible/group_vars/all/apt
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
###############################################################################
|
||||
# Apt package manager configuration.
|
||||
|
||||
# Apt cache TTL in seconds. Default is 3600.
|
||||
apt_cache_valid_time: 3600
|
@ -46,6 +46,8 @@
|
||||
package:
|
||||
name: wget
|
||||
state: present
|
||||
cache_valid_time: "{{ apt_cache_valid_time if ansible_os_family == 'Debian' else omit }}"
|
||||
update_cache: "{{ True if ansible_os_family == 'Debian' else omit }}"
|
||||
|
||||
- name: Ensure Dell srvadmin repository is installed
|
||||
shell: "wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash"
|
||||
|
@ -26,6 +26,8 @@
|
||||
package:
|
||||
name: python3-virtualenv
|
||||
state: present
|
||||
cache_valid_time: "{{ apt_cache_valid_time if ansible_os_family == 'Debian' else omit }}"
|
||||
update_cache: "{{ True if ansible_os_family == 'Debian' else omit }}"
|
||||
become: True
|
||||
|
||||
- name: Ensure global virtualenv directory exists
|
||||
|
@ -27,6 +27,8 @@
|
||||
package:
|
||||
name: python3-virtualenv
|
||||
state: present
|
||||
cache_valid_time: "{{ apt_cache_valid_time if ansible_os_family == 'Debian' else omit }}"
|
||||
update_cache: "{{ True if ansible_os_family == 'Debian' else omit }}"
|
||||
become: True
|
||||
|
||||
- name: Ensure kolla-ansible virtualenv has the latest version of pip installed
|
||||
|
@ -6,6 +6,8 @@
|
||||
package:
|
||||
name: "{{ bootstrap_package_dependencies }}"
|
||||
state: present
|
||||
cache_valid_time: "{{ apt_cache_valid_time if ansible_os_family == 'Debian' else omit }}"
|
||||
update_cache: "{{ True if ansible_os_family == 'Debian' else omit }}"
|
||||
become: True
|
||||
|
||||
- name: Check whether an SSH key exists
|
||||
|
@ -3,4 +3,6 @@
|
||||
package:
|
||||
name: "{{ dev_tools_packages }}"
|
||||
state: present
|
||||
cache_valid_time: "{{ apt_cache_valid_time if ansible_os_family == 'Debian' else omit }}"
|
||||
update_cache: "{{ True if ansible_os_family == 'Debian' else omit }}"
|
||||
become: True
|
||||
|
@ -3,6 +3,8 @@
|
||||
package:
|
||||
name: python3-libselinux
|
||||
state: present
|
||||
cache_valid_time: "{{ apt_cache_valid_time if ansible_os_family == 'Debian' else omit }}"
|
||||
update_cache: "{{ True if ansible_os_family == 'Debian' else omit }}"
|
||||
become: True
|
||||
|
||||
- name: Check if SELinux configuration file exists
|
||||
|
@ -16,6 +16,8 @@
|
||||
# NOTE(mgoddard): select non-empty packages.
|
||||
name: "{{ kolla_ansible_package_dependencies | select | list }}"
|
||||
state: present
|
||||
cache_valid_time: "{{ apt_cache_valid_time if ansible_os_family == 'Debian' else omit }}"
|
||||
update_cache: "{{ True if ansible_os_family == 'Debian' else omit }}"
|
||||
become: True
|
||||
|
||||
- name: Ensure source code checkout parent directory exists
|
||||
|
@ -38,6 +38,7 @@
|
||||
kolla_enable_tls_internal: False
|
||||
kolla_enable_grafana: False
|
||||
kolla_openstack_logging_debug: False
|
||||
apt_cache_valid_time: 3600
|
||||
|
||||
- name: Verify kolla-ansible installation
|
||||
shell: ". {{ temp_path }}/venv/bin/activate && kolla-ansible -h"
|
||||
|
@ -188,6 +188,7 @@
|
||||
custom-password-1: "custom-password-1"
|
||||
custom-password-2: "custom-password-2"
|
||||
kolla_nova_compute_ironic_host: "controller1"
|
||||
apt_cache_valid_time: 3600
|
||||
|
||||
- name: Verify kolla-ansible installation
|
||||
shell: ". {{ temp_path }}/venv/bin/activate && kolla-ansible -h"
|
||||
|
@ -37,6 +37,7 @@
|
||||
kolla_enable_tls_internal: False
|
||||
kolla_enable_grafana: False
|
||||
kolla_openstack_logging_debug: False
|
||||
apt_cache_valid_time: 3600
|
||||
|
||||
- name: List Python packages installed in virtualenv
|
||||
command: "{{ temp_path }}/venv/bin/pip list"
|
||||
|
@ -18,6 +18,8 @@
|
||||
- python3-pip
|
||||
- python3-virtualenv
|
||||
state: present
|
||||
cache_valid_time: "{{ apt_cache_valid_time if ansible_os_family == 'Debian' else omit }}"
|
||||
update_cache: "{{ True if ansible_os_family == 'Debian' else omit }}"
|
||||
become: True
|
||||
|
||||
- name: Ensure source code checkout path exists
|
||||
|
@ -4,6 +4,8 @@
|
||||
- name: Ensure acl package is installed
|
||||
package:
|
||||
name: acl
|
||||
cache_valid_time: "{{ apt_cache_valid_time if ansible_os_family == 'Debian' else omit }}"
|
||||
update_cache: "{{ True if ansible_os_family == 'Debian' else omit }}"
|
||||
become: true
|
||||
|
||||
- name: Create local .pip directory
|
||||
|
@ -2,6 +2,8 @@
|
||||
- name: Ensure iptables is installed
|
||||
package:
|
||||
name: iptables
|
||||
cache_valid_time: "{{ apt_cache_valid_time if ansible_os_family == 'Debian' else omit }}"
|
||||
update_cache: "{{ True if ansible_os_family == 'Debian' else omit }}"
|
||||
become: true
|
||||
|
||||
# iptables -t nat -A POSTROUTING -o {{ interface }} -j SNAT --to-source {{ source_ip }}
|
||||
|
@ -15,6 +15,8 @@
|
||||
- parted
|
||||
- xfsprogs
|
||||
state: present
|
||||
cache_valid_time: "{{ apt_cache_valid_time if ansible_os_family == 'Debian' else omit }}"
|
||||
update_cache: "{{ True if ansible_os_family == 'Debian' else omit }}"
|
||||
become: True
|
||||
when: swift_block_devices | length > 0
|
||||
|
||||
|
@ -34,8 +34,9 @@
|
||||
include_role:
|
||||
name: ../../swift-block-devices
|
||||
vars:
|
||||
swift_block_devices:
|
||||
- device: "{{ loopback.stdout }}"
|
||||
swift_block_devices:
|
||||
- device: "{{ loopback.stdout }}"
|
||||
apt_cache_valid_time: 3600
|
||||
|
||||
- name: Get name of fake partition
|
||||
parted:
|
||||
|
@ -9,8 +9,9 @@
|
||||
include_role:
|
||||
name: ../../swift-block-devices
|
||||
vars:
|
||||
swift_block_devices:
|
||||
- /dev/fake
|
||||
swift_block_devices:
|
||||
- /dev/fake
|
||||
apt_cache_valid_time: 3600
|
||||
|
||||
rescue:
|
||||
- name: Flag that the error was raised
|
||||
|
@ -26,8 +26,9 @@
|
||||
include_role:
|
||||
name: ../../swift-block-devices
|
||||
vars:
|
||||
swift_block_devices:
|
||||
- device: "{{ loopback.stdout }}"
|
||||
swift_block_devices:
|
||||
- device: "{{ loopback.stdout }}"
|
||||
apt_cache_valid_time: 3600
|
||||
|
||||
- name: Get name of fake partition
|
||||
parted:
|
||||
|
@ -10,6 +10,8 @@
|
||||
package:
|
||||
name: lvm2
|
||||
state: present
|
||||
cache_valid_time: "{{ apt_cache_valid_time if ansible_os_family == 'Debian' else omit }}"
|
||||
update_cache: "{{ True if ansible_os_family == 'Debian' else omit }}"
|
||||
become: True
|
||||
|
||||
- name: Check for unmounted block devices
|
||||
|
10
etc/kayobe/apt.yml
Normal file
10
etc/kayobe/apt.yml
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
###############################################################################
|
||||
# Apt package manager configuration.
|
||||
|
||||
# Apt cache TTL in seconds. Default is 3600.
|
||||
#apt_cache_valid_time:
|
||||
|
||||
###############################################################################
|
||||
# Dummy variable to allow Ansible to accept this file.
|
||||
workaround_ansible_issue_8743: yes
|
Loading…
Reference in New Issue
Block a user