diff --git a/ansible/playbooks/files/python38-lxc-3.0.4-11.el8.x86_64.rpm b/ansible/playbooks/files/python38-lxc-3.0.4-11.el8.x86_64.rpm new file mode 100644 index 0000000..c286c9b Binary files /dev/null and b/ansible/playbooks/files/python38-lxc-3.0.4-11.el8.x86_64.rpm differ diff --git a/ansible/playbooks/files/user_debug.yml b/ansible/playbooks/files/user_debug.yml new file mode 100644 index 0000000..9d84420 --- /dev/null +++ b/ansible/playbooks/files/user_debug.yml @@ -0,0 +1,2 @@ +--- +nova_git_repo: master diff --git a/ansible/playbooks/files/user_lxc.yml b/ansible/playbooks/files/user_lxc.yml index 1f14557..b6a01a9 100644 --- a/ansible/playbooks/files/user_lxc.yml +++ b/ansible/playbooks/files/user_lxc.yml @@ -1,3 +1,36 @@ --- lxc_container_base_name: "rocky-8-amd64" 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 --releasever=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 diff --git a/ansible/playbooks/role-infra-host.yml b/ansible/playbooks/role-infra-host.yml index ffe8d4e..e79a269 100644 --- a/ansible/playbooks/role-infra-host.yml +++ b/ansible/playbooks/role-infra-host.yml @@ -73,6 +73,8 @@ args: creates: /etc/openstack_deploy/user_secrets.yml.tar + - import_tasks: tasks/python3-lxc.yml + - name: "[AIO] Deploy and setup configuration / bootstrap" when: aio_install | default('false') block: @@ -104,6 +106,7 @@ with_items: - user_lxc - user_galera + - user_debug tags: config - name: fuck my entire life diff --git a/ansible/playbooks/tasks/python3-lxc.yml b/ansible/playbooks/tasks/python3-lxc.yml new file mode 100644 index 0000000..940fd0f --- /dev/null +++ b/ansible/playbooks/tasks/python3-lxc.yml @@ -0,0 +1,26 @@ +--- +- name: Enable PowerTools repo + # NB: doesn't run command `dnf config-manager --set-enabled PowerTools` as can't make that idempotent + lineinfile: + path: /etc/yum.repos.d/Rocky-PowerTools.repo + create: false # so raise error if not already installed + regexp: enabled= + line: enabled=1 + when: ansible_distribution_major_version == "8" + +- name: Copy distributed openstack configs + ansible.builtin.copy: + src: "files/{{ item }}" + dest: /tmp/ + mode: '0644' + with_items: + - python38-lxc-3.0.4-11.el8.x86_64.rpm + +- name: Install package + ansible.builtin.dnf: + name: "{{ item }}" + with_items: + - https://download.copr.fedorainfracloud.org/results/neil/lxc3.0/epel-8-x86_64/03253339-lxc/lxc-4.0.10-2.el8.x86_64.rpm + - https://download.copr.fedorainfracloud.org/results/neil/lxc3.0/epel-8-x86_64/03253339-lxc/lxc-devel-4.0.10-2.el8.x86_64.rpm + - https://download.copr.fedorainfracloud.org/results/neil/lxc3.0/epel-8-x86_64/03253339-lxc/lxc-libs-4.0.10-2.el8.x86_64.rpm + - /tmp/python38-lxc-3.0.4-11.el8.x86_64.rpm