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_ironic/tasks/ironic_post_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 | --- # 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: Post swift tempURL secret key ansible.builtin.command: > {{ ironic_bin }}/swift {{ keystone_service_adminuri_insecure | bool | ternary('--insecure', '--os-cacert ' ~ _ironic_ssl_truststore_location) }} --os-username "service:{{ glance_service_user_name }}" --os-password "{{ glance_service_password }}" --os-auth-url {{ keystone_service_internalurl }} --os-identity-api-version {{ keystone_service_internalurl.split('/v')[-1] }} post -m temp-url-key:{{ ironic_swift_temp_url_secret_key }} environment: OS_ENDPOINT_TYPE: internalURL changed_when: false when: - not ironic_enable_web_server_for_images | bool - _ironic_api_is_first_play_host - not ironic_standalone | bool tags: - always - name: Get swift account ansible.builtin.shell: > {{ ironic_bin }}/swift {{ keystone_service_adminuri_insecure | bool | ternary('--insecure', '--os-cacert ' ~ _ironic_ssl_truststore_location) }} --os-username "service:{{ glance_service_user_name }}" --os-password "{{ glance_service_password }}" --os-auth-url {{ keystone_service_internalurl }} --os-identity-api-version {{ keystone_service_internalurl.split('/v')[-1] }} stat -v | awk '/StorageURL\:/ {print $2}' environment: OS_ENDPOINT_TYPE: internalURL changed_when: false register: swift_storage_url when: - not ironic_enable_web_server_for_images | bool - (ironic_swift_auth_account is undefined) or (ironic_swift_endpoint is undefined) - not ironic_standalone | bool tags: - always - name: Validate swift output ansible.builtin.fail: msg: | No StorageURL output found using the `swift stat` command and either the ``ironic_swift_auth_account`` or ``ironic_swift_auth_account`` variables are undefined. Ensure swift is functional and/or define those variables. when: - not ironic_enable_web_server_for_images | bool - (ironic_swift_auth_account is undefined) and (ironic_swift_endpoint is undefined) - not ironic_standalone | bool - not swift_storage_url.stdout tags: - always - name: Set the swift auth facts ansible.builtin.set_fact: ironic_swift_auth_account: "{{ swift_storage_url.stdout.split('/v1/')[-1] }}" when: - not ironic_enable_web_server_for_images | bool - ironic_swift_auth_account is undefined - not ironic_standalone | bool tags: - always - name: Set the swift endpoint facts ansible.builtin.set_fact: ironic_swift_endpoint: "{{ swift_storage_url.stdout.split('/v1/')[0] }}" when: - not ironic_enable_web_server_for_images | bool - ironic_swift_endpoint is undefined - not ironic_standalone | bool tags: - always - name: Generate ironic config openstack.config_template.config_template: src: "{{ item.src }}" dest: "{{ item.dest }}" owner: "{{ item.owner | default(ironic_system_user_name) }}" group: "{{ item.group | default(ironic_system_group_name) }}" mode: "0644" config_overrides: "{{ item.config_overrides }}" config_type: "{{ item.config_type }}" when: item.condition | default(True) with_items: - src: "ironic.conf.j2" dest: "/etc/ironic/ironic.conf" config_overrides: "{{ ironic_ironic_conf_overrides }}" config_type: "ini" - src: "rootwrap.conf.j2" dest: "/etc/ironic/rootwrap.conf" owner: "root" group: "root" config_overrides: "{{ ironic_rootwrap_conf_overrides }}" config_type: "ini" - src: "inspector.conf.j2" dest: "/etc/ironic-inspector/ironic-inspector.conf" config_overrides: "{{ ironic_inspector_conf_overrides }}" config_type: "ini" condition: inventory_hostname in groups['ironic-inspector'] - src: "rootwrap.conf.j2" dest: "/etc/ironic-inspector/rootwrap.conf" owner: "root" group: "root" config_overrides: "{{ ironic_inspector_rootwrap_conf_overrides }}" config_type: "ini" condition: inventory_hostname in groups['ironic-inspector'] notify: - Restart ironic services - Restart uwsgi services - name: Implement policy.yaml openstack.config_template.config_template: content: "{{ ironic_policy_overrides }}" dest: "/etc/ironic/policy.yaml" owner: "{{ ironic_system_user_name }}" group: "{{ ironic_system_group_name }}" mode: "0644" config_type: yaml when: - ironic_services['ironic-api']['group'] in group_names tags: - ironic-policy-override - name: Copy rootwrap filters ansible.builtin.copy: src: "{{ item }}" dest: "/etc/ironic/rootwrap.d/" owner: "root" group: "root" mode: "0644" with_fileglob: - rootwrap.d/* notify: - Restart ironic services - Restart uwsgi services - name: Include sudoers file ansible.builtin.template: src: "sudoers.j2" dest: "/etc/sudoers.d/{{ ironic_system_user_name }}_sudoers" mode: "0440" owner: "root" group: "root" |