Skip to content

Commit

Permalink
fix(barbican): create and add implied role creator (#909)
Browse files Browse the repository at this point in the history
Co-authored-by: Mohammed Naser <[email protected]>
  • Loading branch information
mpiscaer and mnaser authored Apr 21, 2024
1 parent 94aabf1 commit 8624823
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/barbican/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ galaxy_info:

dependencies:
- role: defaults
- role: openstacksdk
- role: openstack_cli
- role: openstack_helm_endpoints
vars:
openstack_helm_endpoints_chart: barbican
Expand Down
21 changes: 21 additions & 0 deletions roles/barbican/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,24 @@
openstack_helm_ingress_service_name: barbican-api
openstack_helm_ingress_service_port: 9311
openstack_helm_ingress_annotations: "{{ barbican_ingress_annotations }}"

- name: Create creator role
openstack.cloud.identity_role:
cloud: atmosphere
state: present
name: creator

- name: Add implied roles
run_once: true
ansible.builtin.shell: |
openstack implied role create \
--implied-role {{ item.implies }} \
{{ item.role }}
loop:
- role: member
implies: creator
environment:
OS_CLOUD: atmosphere
register: _octavia_implied_role_create
changed_when: _octavia_implied_role_create.rc == 0
failed_when: _octavia_implied_role_create.rc != 0 and 'Duplicate entry.' not in _octavia_implied_role_create.stderr

0 comments on commit 8624823

Please sign in to comment.