Skip to content

Commit d908c84

Browse files
committed
feat: change loop approach in pulp_content_guard
1 parent 0e83328 commit d908c84

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

roles/pulp_content_guard/tasks/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
username: "{{ pulp_username }}"
66
password: "{{ pulp_password }}"
77
validate_certs: "{{ pulp_validate_certs | bool }}"
8-
name: "{{ item.name }}"
9-
description: "{{ item.description | default(omit) }}"
10-
ca_certificate: "{{ item.ca_certificate | default(omit) }}"
11-
state: "{{ item.state }}"
12-
with_items: "{{ pulp_content_guard_x509_cert_guards }}"
8+
name: "{{ pulp_content_guard_x509_cert_guards[cert_guard_index].name }}"
9+
description: "{{ pulp_content_guard_x509_cert_guards[cert_guard_index].description | default(omit) }}"
10+
ca_certificate: "{{ pulp_content_guard_x509_cert_guards[cert_guard_index].ca_certificate | default(omit) }}"
11+
state: "{{ pulp_content_guard_x509_cert_guards[cert_guard_index].state }}"
12+
loop: "{{ pulp_content_guard_x509_cert_guards | map(attribute='name') }}"
1313
loop_control:
14-
label: "{{ item.name }}"
14+
index_var: cert_guard_index
1515

1616
- name: Ensure RBAC cert guards exist
1717
import_tasks: rbac/rbac.yml

0 commit comments

Comments
 (0)