From ffdb85a388f6cec1881cd1e981998af49020c643 Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Mon, 14 Feb 2022 11:23:01 -0500 Subject: [PATCH] fix lxc vars --- ansible/playbooks/files/user_lxc.yml | 39 +++------------------------- 1 file changed, 3 insertions(+), 36 deletions(-) diff --git a/ansible/playbooks/files/user_lxc.yml b/ansible/playbooks/files/user_lxc.yml index 2838753..f3c0eec 100644 --- a/ansible/playbooks/files/user_lxc.yml +++ b/ansible/playbooks/files/user_lxc.yml @@ -1,40 +1,7 @@ --- lxc_hosts_container_build_command: "dnf --assumeyes --installroot=/var/lib/machines/{{ lxc_container_base_name }} install --setopt=install_weak_deps=False --nodocs rootfiles coreutils dnf rocky-release rocky-repos systemd --releasever=8" - lxc_container_map: - distro: rockylinux - architecture: amd64 - arch: amd64 - release: 8 -lxc_cache_map: - distro: rockylinux - arch: "{{ lxc_architecture_mapping.get( ansible_facts['architecture'] ) }}" - release: 8 - copy_from_host: - - /etc/default/locale - - /etc/environment - - /etc/localtime - - /etc/locale.conf - - /etc/protocols - - /etc/pki/rpm-gpg/ - - /etc/yum/pluginconf.d/fastestmirror.conf - - /etc/yum.repos.d/ - -lxc_cache_extra_distro_packages: - - ca-certificates - - iputils - - iproute - - openssh-server - - policycoreutils - - procps - - python3 - - python3-libs - - rsync # os_keystone runs serial=1 and uses rsync before the distro packages have been installed on all keystone targets - - setup - - sudo - - systemd - - systemd-networkd - - systemd-resolvd - - systemd-sysv - - tzdata + distro: "{{ hostvars[physical_host]['ansible_facts']['distribution'] | lower }}" + arch: "{{ lxc_architecture_mapping.get( hostvars[physical_host]['ansible_facts']['architecture'] | lower ) }}" + release: "{{ hostvars[pyhsical_host]['ansible_facts']['distribution_major_version'] }}"