Execution
Date
08 Dec 2025 13:25:10 +0000
Duration
00:02:05.30
Controller
npdb25d4c136674
User
root
Versions
Ansible
2.18.6
ara
1.7.4 / 1.7.4
Python
3.12.3
Summary
1
Hosts
154
Tasks
154
Results
1
Plays
22
Files
0
Records
File: /home/zuul/src/opendev.org/openstack/openstack-ansible/tests/roles/bootstrap-host/tasks/prepare_aio_config.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 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 | --- # Copyright 2015, 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: Create the required deployment directories ansible.builtin.file: path: "{{ item }}" state: directory mode: "0755" with_items: "{{ bootstrap_host_target_config_paths }}" tags: - create-directories - name: Find user conf.d configurations to deploy ansible.builtin.stat: path: "{{ bootstrap_host_aio_config_path }}/conf.d/{{ item }}.yml.aio" register: conf_d_stat with_items: "{{ bootstrap_host_scenarios_expanded }}" - name: Deploy user conf.d configuration openstack.config_template.config_template: src: "{{ bootstrap_host_aio_config_path }}/conf.d/{{ item.item }}.yml.aio" dest: "/etc/openstack_deploy/conf.d/{{ item.item }}.yml" config_overrides: "{{ item.item.override | default({}) }}" config_type: "yaml" with_items: "{{ conf_d_stat.results | default([]) }}" loop_control: label: "{{ item.item }}" when: - item.stat.exists | bool tags: - deploy-confd - name: Deploy openstack_user_config openstack.config_template.config_template: src: "{{ bootstrap_host_aio_config_path }}/openstack_user_config.yml.aio.j2" dest: "/etc/openstack_deploy/openstack_user_config.yml" config_overrides: "{{ openstack_user_config_overrides | default({}) }}" config_type: "yaml" list_extend: false tags: - deploy-openstack-user-config - name: Deploy user_secrets file openstack.config_template.config_template: src: "{{ bootstrap_host_aio_config_path }}/user_secrets.yml" dest: "/etc/openstack_deploy/{{ bootstrap_host_user_secrets_filename }}" config_overrides: "{{ user_secrets_overrides | default({}) }}" config_type: "yaml" force: false tags: - deploy-user-secrets - name: Generate any missing values in user_secrets ansible.builtin.command: > /opt/ansible-runtime/bin/python {{ bootstrap_host_aio_script_path }}/pw-token-gen.py --file /etc/openstack_deploy/{{ bootstrap_host_user_secrets_filename }} changed_when: false tags: - generate_secrets - name: Set facts when inside of OpenStack-Infra when: - nodepool_vars is defined block: - name: Configure the OpenStack-Infra mirrors vars: _ubuntu_vars: apt_repo_url: "{{ nodepool_vars.NODEPOOL_UCA_MIRROR }}" _ubuntu_conditional_vars: "{{ (ansible_facts['distribution'] == 'Ubuntu') | ternary(_ubuntu_vars, {}) }}" nodepool_overrides: openstack_hosts_centos_mirror_url: "{{ nodepool_vars.NODEPOOL_CENTOS_MIRROR }}" # NOTE: EPEL10 mirrors are not around yet # centos_epel_mirror: "{{ nodepool_vars.NODEPOOL_EPEL_MIRROR }}" # galera_repo_host: "{{ nodepool_vars.NODEPOOL_MIRROR_HOST }}:8080" nova_virt_type: 'qemu' # NOTE(jrosser) # we only run ceph jobs on ubuntu in CI so this is sufficient # NOTE(jrosser) # re-enable these local CI repos when the reef release is mirrored # ceph_stable_repo: "http://{{ nodepool_vars.NODEPOOL_MIRROR_HOST }}/ceph-deb-reef" # we must set the ceph repo seperatley for the ceph_client role # ceph_apt_repos: # ceph: # state: "present" # repo: "deb http://{{ nodepool_vars.NODEPOOL_MIRROR_HOST }}/ceph-deb-reef {{ ansible_facts['distribution_release'] }} main" ansible.builtin.copy: dest: /etc/openstack_deploy/user_openstackci.yml content: "{{ (nodepool_overrides | combine(_ubuntu_conditional_vars)) | to_nice_yaml }}" mode: "0644" - name: Set the package cache timeout to 60 mins in OpenStack-CI ansible.builtin.set_fact: cache_timeout: 3600 when: - cache_timeout is not defined # NOTE(mhayden): The OpenStack CI images for CentOS recently set SELinux to # Enforcing mode by default. While I am normally a supporter of this change, # the SELinux policy work for CentOS is not done yet. - name: Set SELinux to permissive mode in OpenStack-CI ansible.posix.selinux: policy: targeted state: permissive when: - ansible_facts['selinux']['status'] == "enabled" - name: Create vars override folders if we need to test them ansible.builtin.file: path: "{{ item }}" state: directory mode: "0755" with_items: - /etc/openstack_deploy/group_vars - /etc/openstack_deploy/host_vars - /etc/openstack_deploy/host_vars/aio1 - name: Set the user_variables openstack.config_template.config_template: src: "{{ bootstrap_user_variables_template }}" dest: "/etc/openstack_deploy/{{ bootstrap_host_user_variables_filename }}" config_overrides: "{{ user_variables_overrides | default({}) }}" config_type: yaml - name: Set http proxy user variables ansible.builtin.copy: src: "user_variables_proxy.yml" dest: "/etc/openstack_deploy/user_variables_proxy.yml" mode: "0644" when: - "lookup('env', 'http_proxy')|length > 0" - name: Drop the extra user_variables files for this scenario openstack.config_template.config_template: src: "{{ item.src }}" dest: "/etc/openstack_deploy/{{ item.dest }}" config_overrides: "{{ item.config_overrides | default({}) }}" config_type: yaml when: - "item.condition | bool" with_items: - src: aio1_networks.yml.j2 dest: host_vars/aio1/networks.yml condition: true - src: aio1_kernel.yml.j2 dest: host_vars/aio1/kernel.yml condition: true - src: user_variables_ceph.yml.j2 dest: user_variables_ceph.yml condition: "{{ 'ceph' in bootstrap_host_scenarios_expanded }}" - src: user_variables_translations.yml.j2 dest: user_variables_translations.yml condition: "{{ 'translations' in bootstrap_host_scenarios_expanded }}" - src: user_variables_barbican.yml.j2 dest: user_variables_barbican.yml condition: "{{ 'barbican' in bootstrap_host_scenarios_expanded }}" - src: user_variables_blazar.yml.j2 dest: user_variables_blazar.yml condition: "{{ 'blazar' in bootstrap_host_scenarios_expanded }}" - src: user_variables_magnum.yml.j2 dest: user_variables_magnum.yml condition: "{{ 'magnum' in bootstrap_host_scenarios_expanded }}" - src: user_variables_manila.yml.j2 dest: user_variables_manila.yml condition: "{{ 'manila' in bootstrap_host_scenarios_expanded }}" - src: user_variables_nfs.yml.j2 dest: user_variables_nfs.yml condition: "{{ 'nfs' in bootstrap_host_scenarios_expanded }}" - src: user_variables_zun.yml.j2 dest: user_variables_zun.yml condition: "{{ 'zun' in bootstrap_host_scenarios_expanded }}" - src: user_variables_octavia.yml.j2 dest: user_variables_octavia.yml condition: "{{ 'octavia' in bootstrap_host_scenarios_expanded }}" - src: user_variables_ironic.yml.j2 dest: user_variables_ironic.yml condition: "{{ 'ironic' in bootstrap_host_scenarios_expanded }}" - src: user_variables_horizon.yml.j2 dest: user_variables_horizon.yml condition: "{{ 'horizon' in bootstrap_host_scenarios }}" - src: user_variables_hardening.yml.j2 dest: user_variables_hardening.yml condition: "{{ 'hardening' in bootstrap_host_scenarios_expanded }}" - src: user_variables_stepca.yml.j2 dest: user_variables_stepca.yml condition: "{{ 'stepca' in bootstrap_host_scenarios_expanded }}" - src: user_variables_tls.yml.j2 dest: user_variables_tls.yml condition: "{{ 'tls' in bootstrap_host_scenarios_expanded }}" - name: Copy modified cinder-volume env.d file for ceph scenario ansible.builtin.copy: src: "{{ playbook_dir }}/../etc/openstack_deploy/env.d/cinder-volume.yml.container.example" dest: "/etc/openstack_deploy/env.d/cinder-volume.yml" mode: "0644" when: - "'ceph' in bootstrap_host_scenarios_expanded" - name: Create user-space overrides ansible.builtin.lineinfile: path: "{{ item.path }}" state: present line: "{{ item.line }}" create: true mode: "0644" with_items: - path: /etc/openstack_deploy/group_vars/hosts.yml line: 'babar: "elephant"' - path: /etc/openstack_deploy/group_vars/hosts.yml line: 'lxc_hosts_package_state: "present"' - path: /etc/openstack_deploy/host_vars/localhost.yml line: 'security_package_state: "present"' - path: /etc/openstack_deploy/host_vars/localhost.yml line: 'tintin: "milou"' when: "(lookup('env','ACTION') | default(false,true)) == 'varstest'" |