diff --git a/defaults/main.yml b/defaults/main.yml index 78b85613..702a60ff 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -169,7 +169,7 @@ lxc_cache_prep_post_commands: '## post command skipped ##' # User defined variable pointing to a specific variable file used when setting # up the base container image. Deployers can use the provided container variable # files by simply inputting the file name -# "{{ ansible_distribution }}-{{ ansible_distribution_version }}-container.yml" +# "{{ ansible_facts['distribution'] }}-{{ ansible_facts['distribution_version'] }}-container.yml" # or by providing the full path to a local file containing all of the variables # needed to prepare a container. built-in supported values are: # [redhat-7.yml, ubuntu-16.04.yml, ubuntu-18.04.yml] diff --git a/meta/main.yml b/meta/main.yml index 12ca26e3..316a6c5b 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -20,10 +20,13 @@ galaxy_info: license: Apache2 min_ansible_version: 2.4 platforms: + - name: Debian + versions: + - buster - name: Ubuntu versions: - - xenial - bionic + - focal - name: EL versions: - 8 diff --git a/tasks/lxc_cache_preparation.yml b/tasks/lxc_cache_preparation.yml index a756f201..ae213da8 100644 --- a/tasks/lxc_cache_preparation.yml +++ b/tasks/lxc_cache_preparation.yml @@ -96,7 +96,7 @@ mode: "0440" src: sudoers.j2 when: - - ansible_facts['pkg_mgr'] == 'yum' + - ansible_facts['pkg_mgr'] == 'dnf' - name: Adjust sshd configuration in container lineinfile: diff --git a/templates/lxc-net-suseredhat-postdown.cfg.j2 b/templates/lxc-net-redhat-postdown.cfg.j2 similarity index 100% rename from templates/lxc-net-suseredhat-postdown.cfg.j2 rename to templates/lxc-net-redhat-postdown.cfg.j2 diff --git a/tests/test.yml b/tests/test.yml index 3de85351..3fc486cc 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -118,6 +118,6 @@ - interface_file is search('.*255.255.255.0.*') - sysctl_conf is search('fs.inotify.max_user_instances.*') - "lxc_bridge_file.stat.exists" - - lxcbr0_facts.ansible_facts.ansible_lxcbr0.ipv4.address is match('10.100.100.1') + - ansible_facts['lxcbr0']['ipv4']['address'] is match('10.100.100.1') - extra_host_package_state is not changed - extra_cache_package_find.matched > 0 diff --git a/vars/gentoo-host.yml b/vars/gentoo-host.yml deleted file mode 100644 index 2accd71d..00000000 --- a/vars/gentoo-host.yml +++ /dev/null @@ -1,50 +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. - -# Required packages. -lxc_hosts_distro_packages: - - net-misc/aria2 - - net-misc/bridge-utils - - sys-fs/btrfs-progs - - app-admin/cgmanager - - sys-apps/dbus - - dev-util/debootstrap - - net-dns/dnsmasq - - dev-vcs/git - - sys-libs/libseccomp - - net-firewall/iptables - - sys-apps/irqbalance - - app-emulation/lxc - - app-emulation/lxc-templates - - dev-python/lxc-python2 - - dev-python/python3-lxc - - app-arch/xz-utils - - sys-apps/ethtool - - sys-process/procps - -# Package to remove from the host -lxc_hosts_remove_distro_packages: - - dnsmasq - -lxc_xz_bin: xz - -system_config_dir: "/etc/conf.d" -systemd_utils_prefix: "/lib/systemd" - -lxc_cached_network_interfaces: - - src: "lxc-networkd-bridge.network.j2" - dest: "/etc/systemd/network/{{ lxc_net_bridge }}.network" - - src: "lxc-networkd-bridge.netdev.j2" - dest: "/etc/systemd/network/{{ lxc_net_bridge }}.netdev" diff --git a/vars/redhat-host.yml b/vars/redhat-host.yml index 5b8d358f..3d3e3562 100644 --- a/vars/redhat-host.yml +++ b/vars/redhat-host.yml @@ -43,7 +43,7 @@ lxc_xz_bin: xz lxc_cached_network_interfaces: - src: "lxc-net-redhat-bridge.cfg.j2" dest: "/etc/sysconfig/network-scripts/ifcfg-{{ lxc_net_bridge }}" - - src: "lxc-net-suseredhat-postdown.cfg.j2" + - src: "lxc-net-redhat-postdown.cfg.j2" dest: "/etc/sysconfig/network-scripts/ifdown-post-{{ lxc_net_bridge }}" mode: "0755" interface: "${DEVICE}"