Execution
Date
14 Dec 2025 10:21:40 +0000
Duration
00:43:55.98
Controller
aio1.openstack.local
User
root
Versions
Ansible
2.18.6
ara
1.7.4 / 1.7.4
Python
3.13.5
Summary
13
Hosts
2438
Tasks
2413
Results
107
Plays
511
Files
0
Records
File: /home/zuul/src/opendev.org/openstack/openstack-ansible-os_nova/tasks/nova_install.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | --- # Copyright 2014, 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. - name: Record the installation method community.general.ini_file: dest: "/etc/ansible/facts.d/openstack_ansible.fact" section: "nova" option: "install_method" value: "{{ nova_install_method }}" mode: "0644" - name: Refresh local facts to ensure the nova section is present ansible.builtin.setup: filter: ansible_local gather_subset: "!all" - name: Add dependency repos for RDO ansible.builtin.package: name: "{{ nova_distro_repos }}" state: "{{ nova_package_state }}" retries: 5 delay: 2 when: - ansible_facts['pkg_mgr'] == 'dnf' - nova_install_method == 'distro' - name: Install distro packages ansible.builtin.package: name: "{{ nova_package_list }}" state: "{{ nova_package_state }}" update_cache: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}" cache_valid_time: "{{ (ansible_facts['pkg_mgr'] == 'apt') | ternary(cache_timeout, omit) }}" register: install_packages until: install_packages is success retries: 5 delay: 2 tags: - nova-pip-packages notify: - "Restart nova services" - name: Install the python venv ansible.builtin.import_role: name: "python_venv_build" vars: venv_python_executable: "{{ nova_venv_python_executable }}" venv_build_constraints: "{{ nova_git_constraints }}" venv_build_distro_package_list: "{{ nova_devel_distro_packages }}" venv_install_destination_path: "{{ nova_bin | dirname }}" venv_pip_install_args: "{{ nova_pip_install_args }}" venv_packages_to_symlink: >- {{ (nova_services['nova-compute']['group'] in group_names and nova_virt_type != 'ironic') | ternary(nova_compute_kvm_packages_to_symlink, []) }} venv_pip_packages: "{{ nova_venv_packages }}" venv_facts_when_changed: - section: "nova" option: "need_service_restart" value: "True" - section: "nova" option: "need_online_data_migrations" value: "True" - section: "nova" option: "venv_tag" value: "{{ nova_venv_tag }}" when: nova_install_method == 'source' - name: Including nova_console_novnc tasks ansible.builtin.include_tasks: "consoles/nova_console_novnc_install.yml" when: - nova_services['nova-novncproxy']['group'] in group_names - "'novnc' in nova_console_proxy_types" args: apply: tags: - nova-install - nova-novnc-console tags: - nova-install - nova-novnc-console - name: Including nova_console_spice tasks ansible.builtin.include_tasks: "consoles/nova_console_spice_install.yml" when: - nova_services['nova-spicehtml5proxy']['group'] in group_names - "'spice' in nova_console_proxy_types" args: apply: tags: - nova-install - nova-spice-console tags: - nova-install - nova-spice-console # NOTE(jrosser) We do not use the service_facts: module here as it will add # a very large quantity of facts for the host. To keep the facts # size minimised a more direct approach to check the service status is used - name: Check nova-novncproxy service status shell: systemctl is-active nova-novncproxy.service || systemctl is-enabled nova-novncproxy.service failed_when: false changed_when: false become: true register: novnc_proxy_enabled tags: - skip_ansible_lint - name: Check nova-spicehtml5proxy service status shell: systemctl is-active nova-spicehtml5proxy.service || systemctl is-enabled nova-spicehtml5proxy.service failed_when: false changed_when: false become: true register: spicehtml5_proxy_enabled tags: - skip_ansible_lint - name: Check nova-serialproxy service status shell: systemctl is-active nova-serialproxy.service || systemctl is-enabled nova-serialproxy.service failed_when: false changed_when: false become: true register: serial_proxy_enabled tags: - skip_ansible_lint - name: Disable existing services for any unused console types ansible.builtin.systemd: name: "{{ item.service }}" enabled: false state: stopped when: (item.condition | bool) and item.type not in nova_console_proxy_types loop: - service: "nova-novncproxy.service" condition: "{{ novnc_proxy_enabled.rc is defined and novnc_proxy_enabled.rc == 0 }}" type: "novnc" - service: "nova-spicehtml5proxy.service" condition: "{{ spicehtml5_proxy_enabled.rc is defined and spicehtml5_proxy_enabled.rc == 0 }}" type: "spice" - service: "nova-serialproxy.service" condition: "{{ serial_proxy_enabled.rc is defined and serial_proxy_enabled.rc == 0 }}" type: "serialconsole" - name: Record local facts for distro path when: nova_install_method == 'distro' block: - name: Record the osa version deployed community.general.ini_file: dest: "/etc/ansible/facts.d/openstack_ansible.fact" section: nova option: venv_tag value: "{{ nova_venv_tag }}" mode: "0644" - name: Initialise the upgrade facts community.general.ini_file: dest: "/etc/ansible/facts.d/openstack_ansible.fact" section: nova option: "{{ item.name }}" value: "{{ item.state }}" mode: "0644" with_items: - name: "need_service_restart" state: "True" - name: "need_online_data_migrations" state: "True" when: - (install_packages is changed) or (ansible_local is not defined) or ('openstack_ansible' not in ansible_local) or ('nova' not in ansible_local['openstack_ansible']) or ('need_online_data_migrations' not in ansible_local['openstack_ansible']['nova']) or ('need_service_restart' not in ansible_local['openstack_ansible']['nova']) |