diff --git a/ansible/group_vars/all/bifrost b/ansible/group_vars/all/bifrost index d26c9c868..ee9bef43c 100644 --- a/ansible/group_vars/all/bifrost +++ b/ansible/group_vars/all/bifrost @@ -21,9 +21,8 @@ kolla_bifrost_firewalld_internal_zone: trusted # DIB base OS element. Default is {{ os_distribution }}. kolla_bifrost_dib_os_element: "{{ os_distribution }}" -# DIB image OS release. Default is "focal" when os_distribution is "ubuntu", or -# "8" otherwise. -kolla_bifrost_dib_os_release: "{{ 'focal' if os_distribution == 'ubuntu' else '8' }}" +# DIB image OS release. Default is {{ os_release }}. +kolla_bifrost_dib_os_release: "{{ os_release }}" # List of default DIB elements. Default is ["disable-selinux", # "enable-serial-console", "vm"] when os_distribution is "centos", or diff --git a/ansible/group_vars/all/globals b/ansible/group_vars/all/globals index 9d9d6e314..f6cad0af0 100644 --- a/ansible/group_vars/all/globals +++ b/ansible/group_vars/all/globals @@ -47,3 +47,7 @@ kayobe_ansible_user: "stack" # OS distribution name. Valid options are "centos", "ubuntu". Default is # "centos". os_distribution: "centos" + +# OS release. Valid options are "8-stream" when os_distribution is "centos", or +# "focal" when os_distribution is "ubuntu". +os_release: "{{ '8-stream' if os_distribution == 'centos' else 'focal' }}" diff --git a/ansible/group_vars/all/ipa b/ansible/group_vars/all/ipa index ef819ec52..77bae9f9b 100644 --- a/ansible/group_vars/all/ipa +++ b/ansible/group_vars/all/ipa @@ -23,6 +23,7 @@ ipa_builder_source_version: master # images. Default is ["centos", "enable-serial-console", # "ironic-python-agent-ramdisk"]. ipa_build_dib_elements_default: + # TODO(mgoddard): Use {{ os_distribution }} here when Ubuntu IPA builds work. - centos - enable-serial-console - ironic-python-agent-ramdisk @@ -41,6 +42,9 @@ ipa_build_dib_elements: > # Dictionary of default environment variables to provide to Diskimage Builder # (DIB) during IPA image build. ipa_build_dib_env_default: + # TODO(mgoddard): Use {{ os_release }} here when we use os_distribution + # above. + DIB_RELEASE: "8-stream" DIB_REPOLOCATION_ironic_agent: "{{ ipa_build_source_url }}" DIB_REPOREF_ironic_agent: "{{ ipa_build_source_version }}" diff --git a/etc/kayobe/bifrost.yml b/etc/kayobe/bifrost.yml index 8d20ebebe..91c8bcc56 100644 --- a/etc/kayobe/bifrost.yml +++ b/etc/kayobe/bifrost.yml @@ -21,8 +21,7 @@ # DIB base OS element. Default is {{ os_distribution }}. #kolla_bifrost_dib_os_element: -# DIB image OS release. Default is "focal" when os_distribution is "ubuntu", or -# "8" otherwise. +# DIB image OS release. Default is {{ os_release }}. #kolla_bifrost_dib_os_release: # List of default DIB elements. Default is ["disable-selinux", diff --git a/etc/kayobe/globals.yml b/etc/kayobe/globals.yml index 64290d926..9efc114f6 100644 --- a/etc/kayobe/globals.yml +++ b/etc/kayobe/globals.yml @@ -49,6 +49,10 @@ # "centos". #os_distribution: +# OS release. Valid options are "8-stream" when os_distribution is "centos", or +# "focal" when os_distribution is "ubuntu". +#os_release: + ############################################################################### # Dummy variable to allow Ansible to accept this file. workaround_ansible_issue_8743: yes diff --git a/releasenotes/notes/os-distribution-69445eb19a611d43.yaml b/releasenotes/notes/os-distribution-69445eb19a611d43.yaml index 69c1f8816..df8e8d2d8 100644 --- a/releasenotes/notes/os-distribution-69445eb19a611d43.yaml +++ b/releasenotes/notes/os-distribution-69445eb19a611d43.yaml @@ -3,7 +3,10 @@ features: - | Adds an ``os_distribution`` variable in ``etc/kayobe/globals.yml``, with a default value of ``centos``. The variable can also be set to ``ubuntu``, - and sets sensible default values for other variables. + and sets sensible default values for other variables. Also adds an + ``os_release`` variable in the same file, with a default value of + ``8-stream`` when ``os_distribution`` is ``centos`` or ``focal`` when + ``os_distribution`` is ``ubuntu``. upgrade: - | Modifies the default value of ``controller_bootstrap_user``,