From 92aefbfa57d14982641871b466888d176ce5271b Mon Sep 17 00:00:00 2001 From: OpenStack Proposal Bot Date: Wed, 4 Sep 2019 15:17:04 +0000 Subject: [PATCH] Updated from OpenStack Ansible Tests Change-Id: Ia682e924f463fe97532709ed18823ba990e10272 --- .gitignore | 28 +++++++++++----------------- tasks/db_setup.yml | 1 + tasks/service_setup.yml | 23 ++++++++++++++++++++--- 3 files changed, 32 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index ce47fe6f..3a772066 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,14 @@ +# Add patterns in here to exclude files created by tools integrated with this +# repository, such as test frameworks from the project's recommended workflow, +# rendered documentation and package builds. +# +# Don't add patterns to exclude files created by preferred personal tools +# (editors, IDEs, your operating system itself even). These should instead be +# maintained outside the repository, for example in a ~/.gitignore file added +# with: +# +# git config --global core.excludesfile '~/.gitignore' + # Compiled source # ################### *.com @@ -33,25 +44,11 @@ logs/* # OS generated files # ###################### -.DS_Store -.DS_Store? ._* -.Spotlight-V100 -.Trashes -.idea .tox -*.sublime* *.egg-info -Icon? -ehthumbs.db -Thumbs.db .eggs -# User driven backup files # -############################ -*.bak -*.swp - # Generated by pbr while building docs ###################################### AUTHORS @@ -70,6 +67,3 @@ tests/*.retry # Git clones openstack-ansible-ops previous - -# Editor files -.vscode diff --git a/tasks/db_setup.yml b/tasks/db_setup.yml index cdd8e940..7a0120d4 100644 --- a/tasks/db_setup.yml +++ b/tasks/db_setup.yml @@ -29,6 +29,7 @@ mysql_db: name: "{{ item.name }}" loop: "{{ _oslodb_databases }}" + no_log: true - name: Grant access to the database for the service mysql_user: diff --git a/tasks/service_setup.yml b/tasks/service_setup.yml index d43d14e9..9817aa18 100644 --- a/tasks/service_setup.yml +++ b/tasks/service_setup.yml @@ -31,13 +31,26 @@ vars: ansible_python_interpreter: "{{ _service_setup_host_python_interpreter }}" block: + - name: Add keystone domain + os_keystone_domain: + cloud: default + state: present + name: "{{ _domain_name }}" + endpoint_type: admin + verify: "{{ not _service_adminuri_insecure }}" + register: add_domain + when: _domain_name is defined + until: add_domain is success + retries: 5 + delay: 10 + - name: Add service project os_project: cloud: default state: present name: "{{ _project_name }}" - description: "{{ _project_description | default('') }}" - domain_id: "default" + description: "{{ _project_description | default(omit) }}" + domain_id: "{{ _project_domain | default('default') }}" endpoint_type: admin validate_certs: "{{ not (_service_adminuri_insecure | default(True) | bool) }}" register: add_service @@ -81,6 +94,7 @@ with_items: "{{ _service_users }}" retries: 5 delay: 10 + no_log: True - name: Add service users os_user: @@ -88,10 +102,11 @@ state: present name: "{{ item.name }}" password: "{{ item.password }}" - domain: default + domain: "{{ item.domain | default('default') }}" default_project: "{{ item.project | default(_service_project_name) }}" endpoint_type: admin validate_certs: "{{ not (_service_adminuri_insecure | default(True) | bool) }}" + update_password: always register: add_service when: - not (_service_in_ldap | default(False) | bool) @@ -112,6 +127,7 @@ user: "{{ item.name }}" role: "{{ item.role }}" project: "{{ item.project | default(_service_project_name) }}" + domain: "{{ item.domain | default(omit) }}" endpoint_type: admin validate_certs: "{{ not (_service_adminuri_insecure | default(True) | bool) }}" register: add_service @@ -125,6 +141,7 @@ with_items: "{{ _service_users }}" retries: 5 delay: 10 + no_log: True - name: Add endpoints to keystone endpoint catalog os_keystone_endpoint: