# 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. --- # NOTE(cinerama) dummy-defaults.yml is an empty defaults file. We use it # here to ensure that with_first_found won't fail should we not have # defaults for a particular distribution, version, etc. - name: Include OS family-specific defaults include_vars: "{{ item }}" with_first_found: - "../defaults/required_defaults_{{ ansible_os_family }}_family.yml" - "../defaults/dummy-defaults.yml" - name: Include OS distribution-specific defaults include_vars: "{{ item }}" with_first_found: - "../defaults/required_defaults_{{ ansible_distribution }}.yml" - "../defaults/dummy-defaults.yml" - name: Include OS version-specific defaults include_vars: "{{ item }}" with_first_found: - "../defaults/required_defaults_{{ ansible_distribution }}_{{ ansible_distribution_release }}.yml" - "../defaults/required_defaults_{{ ansible_distribution }}_{{ ansible_distribution_version }}.yml" - "../defaults/dummy-defaults.yml" - name: "Install Keystone" include: install.yml when: enable_keystone is defined and enable_keystone |bool == True and skip_package_install | bool != True - name: "Bootstrap Keystone" include: bootstrap.yml when: enable_keystone is defined and enable_keystone |bool == True and skip_bootstrap | bool != True - name: "Start Keystone services" include: start.yml when: enable_keystone is defined and enable_keystone |bool == True and skip_start | bool != True - name: "Change the bootstrap password from the static value on upgrade" os_user: name: "{{ keystone.bootstrap.username }}" password: "{{ keystone.bootstrap.password }}" update_password: always state: present domain: "default" default_project: "{{ keystone.bootstrap.project_name }}" auth: auth_url: "{{ ironic.service_catalog.auth_url | default('http://127.0.0.1:5000/') }}" username: "{{ keystone.bootstrap.username }}" password: "ChangeThisPa55w0rd" project_name: "{{ keystone.bootstrap.project_name | default('admin') }}" project_domain_id: "default" user_domain_id: "default" wait: yes environment: "{{ bifrost_venv_env if enable_venv else {} }}" no_log: true ignore_errors: true when: - enable_keystone | bool - not skip_bootstrap | bool - test_created_keystone_db is undefined or not test_created_keystone_db.changed | bool - keystone.bootstrap.enabled | bool - keystone.database.host == 'localhost'