Unify variables for all operating systems.

Refactoring of the lxc_hosts role means that there is no need for
differences in variables between operating systems.

This patch makes the ubuntu focal CI jobs non voting as it must
merge at the same time as a corresponding patch to lxc_hosts.

Change-Id: I29e91320baebb9a3a649533a0e1d3a433dd04ad9
This commit is contained in:
Jonathan Rosser 2022-04-25 11:03:08 +01:00
parent 2765025768
commit 91b7997b34
6 changed files with 25 additions and 102 deletions

View File

@ -30,18 +30,6 @@
tags:
- always
- name: Gather variables for each operating system
include_vars: "{{ item }}"
with_first_found:
- "{{ lxc_user_defined_container | default([]) }}"
- "{{ hostvars[physical_host]['ansible_facts']['distribution'] | lower }}-{{ hostvars[physical_host]['ansible_facts']['distribution_version'] | lower }}.yml"
- "{{ hostvars[physical_host]['ansible_facts']['distribution'] | lower }}-{{ hostvars[physical_host]['ansible_facts']['distribution_major_version'] | lower }}.yml"
- "{{ hostvars[physical_host]['ansible_facts']['os_family'] | lower }}-{{ hostvars[physical_host]['ansible_facts']['distribution_major_version'] | lower }}.yml"
- "{{ hostvars[physical_host]['ansible_facts']['distribution'] | lower }}.yml"
- "{{ hostvars[physical_host]['ansible_facts']['os_family'] | lower }}.yml"
tags:
- always
- name: Read custom facts from previous runs
setup:
filter: ansible_local

View File

@ -1,27 +0,0 @@
---
# Copyright 2019, VEXXHOST, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
lxc_container_map:
distro: debian
arch: "{{ lxc_architecture_mapping.get( hostvars[physical_host]['ansible_facts']['architecture'] | lower ) }}"
release: "{{ hostvars[physical_host]['ansible_facts']['distribution_major_version'] }}"
lxc_container_default_config_list:
- "lxc.start.auto=1"
- "lxc.start.delay=15"
- "lxc.group=onboot"
- "lxc.group=openstack"
- "lxc.autodev=1"
- "lxc.hook.autodev=/var/lib/lxc/{{ inventory_hostname }}/autodev"

View File

@ -13,6 +13,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
lxc_container_map:
distro: "{{ hostvars[physical_host]['ansible_facts']['distribution'] | lower }}"
arch: "{{ lxc_architecture_mapping.get( hostvars[physical_host]['ansible_facts']['architecture'] | lower ) }}"
release: "{{ hostvars[physical_host]['ansible_facts']['distribution_major_version'] }}"
lxc_container_default_config_list:
- "lxc.start.auto=1"
- "lxc.start.delay=15"
- "lxc.group=onboot"
- "lxc.group=openstack"
- "lxc.autodev=1"
- "lxc.hook.autodev=/var/lib/lxc/{{ inventory_hostname }}/autodev"
# A set of container networks used within the LXC containers. This information
# is sourced from the assumed "container_networks", "container_extra_networks"
# and "lxc_container_networks" variables and combined into a single

View File

@ -1,27 +0,0 @@
---
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
lxc_container_map:
distro: "{{ hostvars[physical_host]['ansible_facts']['distribution'] | lower }}"
arch: "{{ lxc_architecture_mapping.get( hostvars[physical_host]['ansible_facts']['architecture'] | lower ) }}"
release: "{{ hostvars[physical_host]['ansible_facts']['distribution_major_version'] }}"
lxc_container_default_config_list:
- "lxc.start.auto=1"
- "lxc.start.delay=15"
- "lxc.group=onboot"
- "lxc.group=openstack"
- "lxc.autodev=1"
- "lxc.hook.autodev=/var/lib/lxc/{{ inventory_hostname }}/autodev"

View File

@ -1,28 +0,0 @@
---
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
lxc_container_map:
distro: ubuntu
arch: "{{ lxc_architecture_mapping.get( hostvars[physical_host]['ansible_facts']['architecture'] | lower ) }}"
release: "{{ hostvars[physical_host]['ansible_facts']['distribution_release'] }}"
lxc_container_default_config_list:
- "lxc.start.auto=1"
- "lxc.start.delay=15"
- "lxc.group=onboot"
- "lxc.group=openstack"
- "lxc.autodev=1"
- "lxc.pty.max=1024"
- "lxc.hook.autodev=/var/lib/lxc/{{ inventory_hostname }}/autodev"

View File

@ -23,18 +23,22 @@
- build-release-notes-jobs-python3
check:
jobs:
- openstack-ansible-deploy-hosts_lxc-ubuntu-focal:
voting: false
- openstack-ansible-dir-centos-8-stream
- openstack-ansible-dir-ubuntu-bionic
- openstack-ansible-dir-ubuntu-focal
#- openstack-ansible-dir-ubuntu-focal
- openstack-ansible-overlayfs-centos-8-stream
- openstack-ansible-overlayfs-ubuntu-focal
- openstack-ansible-btrfs-ubuntu-focal
- openstack-ansible-zfs-ubuntu-focal
#- openstack-ansible-overlayfs-ubuntu-focal
#- openstack-ansible-btrfs-ubuntu-focal
#- openstack-ansible-zfs-ubuntu-focal
gate:
jobs:
- openstack-ansible-deploy-hosts_lxc-ubuntu-focal:
voting: false
- openstack-ansible-dir-centos-8-stream
- openstack-ansible-dir-ubuntu-focal
#- openstack-ansible-dir-ubuntu-focal
- openstack-ansible-overlayfs-centos-8-stream
- openstack-ansible-overlayfs-ubuntu-focal
- openstack-ansible-btrfs-ubuntu-focal
- openstack-ansible-zfs-ubuntu-focal
#- openstack-ansible-overlayfs-ubuntu-focal
#- openstack-ansible-btrfs-ubuntu-focal
#- openstack-ansible-zfs-ubuntu-focal