Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge "Add toggle for sensitive data within keystone" into stable/train
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Aug 10, 2020
2 parents 24b96ab + b8d00df commit 47bafcc
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 80 deletions.
57 changes: 23 additions & 34 deletions tripleo_ansible/roles/test_deps/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,51 +36,40 @@
path: "{{ test_deps_mirrors_file_path }}"
register: mirrors_file

- when: mirrors_file.stat.exists
block:

- name: Discover mirror for RDO if exists
shell: |
source {{ test_deps_mirrors_file_path }}
echo $NODEPOOL_RDO_PROXY
register: rdo_mirror_proxy
changed_when: false

- name: Set fact for the mirror with proxy
set_fact:
rdo_mirror: "{{ rdo_mirror_proxy.stdout|default('https://trunk.rdoproject.org', true) }}"

- name: Set fact for the mirror without proxy
set_fact:
rdo_mirror: 'https://trunk.rdoproject.org'
when: not mirrors_file.stat.exists

- name: Print used mirror
debug: var=rdo_mirror

- name: Set test_deps_repo
set_fact:
test_deps_repo: "{{ test_deps_repo.replace('https://trunk.rdoproject.org', rdo_mirror) }}"

- name: RHEL Block
become: true
when:
- (ansible_os_family | lower) == 'redhat'
- mirrors_file.stat.exists | bool
block:
- name: install deplorean repo
get_url:
url: "{{ rdo_mirror }}/{{ test_deps_repo_version }}/current-tripleo/delorean.repo"
- name: Fetch latest repo version
uri:
url: https://trunk.rdoproject.org/{{ (ansible_distribution | lower) }}{{ ansible_distribution_major_version }}/current/delorean.repo
return_content: true
register: tripleo_packages

- name: Create default repo file
copy:
content: "{{ tripleo_packages.content }}"
dest: /etc/yum.repos.d/delorean.repo

- name: install deplorean-deps repo
get_url:
url: "{{ rdo_mirror }}/{{ test_deps_repo_version }}/delorean-deps.repo"
dest: /etc/yum.repos.d/delorean-deps.repo
- name: Install tripleo-repos package
package:
name: "python*tripleo-repos"
state: present

- include_tasks: tripleo-setup.yml
- name: Tripleo setup block
when:
- (ansible_os_family | lower) == 'redhat'
- test_deps_setup_tripleo | bool
block:
- name: Create tripleo repos
command: tripleo-repos -b master current-tripleo

- name: Install tripleo packages
package:
name: "{{ test_deps_tripleo_packages }}"
state: present

- name: Package block
become: true
Expand Down
39 changes: 0 additions & 39 deletions tripleo_ansible/roles/test_deps/tasks/tripleo-setup.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@


# All variables intended for modification should be placed in this file.
tripleo_keystone_resources_hide_sensitive_logs: "{{ hide_sensitive_logs | default(true) }}"
tripleo_keystone_resources_debug: "{{ ((ansible_verbosity | int) >= 2) | bool }}"

# All variables within this role should have a prefix of "tripleo_keystone_resources"
tripleo_keystone_resources_cloud_name: openstack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
- keystone_enable_member | default(tripleo_keystone_resources_member_role_enabled)

- name: Create admin user
no_log: true
no_log: "{{ tripleo_keystone_resources_hide_sensitive_logs | bool }}"
os_user:
cloud: "{{ tripleo_keystone_resources_cloud_name }}"
name: admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# under the License.

- name: "Async creation of Keystone {{ keystone_endpoint_type }} endpoint"
no_log: true
no_log: "{{ tripleo_keystone_resources_hide_sensitive_logs | bool }}"
os_keystone_endpoint:
cloud: "{{ tripleo_keystone_resources_cloud_name }}"
service: "{{ tripleo_keystone_resources_data.key }}"
Expand All @@ -31,7 +31,7 @@
loop_var: tripleo_keystone_resources_data

- name: "Check Keystone {{ keystone_endpoint_type }} endpoint status"
no_log: true
no_log: "{{ not (tripleo_keystone_resources_debug | bool) }}"
async_status:
jid: "{{ tripleo_keystone_resources_endpoint_async_result_item.ansible_job_id }}"
loop: "{{ tripleo_keystone_resources_endpoint_results.results }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# under the License.

- name: Async creation of Keystone service
no_log: true
no_log: "{{ tripleo_keystone_resources_hide_sensitive_logs | bool }}"
os_keystone_service:
cloud: "{{ tripleo_keystone_resources_cloud_name }}"
name: "{{ tripleo_keystone_resources_data.key }}"
Expand All @@ -30,7 +30,7 @@
loop_var: tripleo_keystone_resources_data

- name: Check Keystone service status
no_log: true
no_log: "{{ not (tripleo_keystone_resources_debug | bool) }}"
async_status:
jid: "{{ tripleo_keystone_resources_service_async_result_item.ansible_job_id }}"
loop: "{{ tripleo_keystone_resources_service_results.results }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# under the License.

- name: "Async creation of Keystone user"
no_log: true
no_log: "{{ tripleo_keystone_resources_hide_sensitive_logs | bool }}"
os_user:
cloud: "{{ tripleo_keystone_resources_cloud_name }}"
name: "{{ lookup('dict', tripleo_keystone_resources_data).key }}"
Expand All @@ -32,7 +32,7 @@
loop_var: tripleo_keystone_resources_data

- name: "Check Keystone user status"
no_log: true
no_log: "{{ not (tripleo_keystone_resources_debug | bool) }}"
async_status:
jid: "{{ tripleo_keystone_resources_user_async_result_item.ansible_job_id }}"
loop: "{{ tripleo_keystone_resources_user_results.results }}"
Expand Down

0 comments on commit 47bafcc

Please sign in to comment.