Fix wrong syntax for jinja sub list extraction and addition of missing role template
This commit is contained in:
parent
58ecd312a7
commit
ceb97e5809
3 changed files with 17 additions and 2 deletions
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
- name: Local Volume Provisioner | Insert extra templates to Local Volume Provisioner templates list for PodSecurityPolicy
|
- name: Local Volume Provisioner | Insert extra templates to Local Volume Provisioner templates list for PodSecurityPolicy
|
||||||
set_fact:
|
set_fact:
|
||||||
local_volume_provisioner_templates: "{{ local_volume_provisioner_templates[:2] + local_volume_provisioner_templates_for_psp_not_system_ns + local_volume_provisioner_templates[3:] }}"
|
local_volume_provisioner_templates: "{{ local_volume_provisioner_templates[:2] + local_volume_provisioner_templates_for_psp_not_system_ns + local_volume_provisioner_templates[2:] }}"
|
||||||
when:
|
when:
|
||||||
- podsecuritypolicy_enabled
|
- podsecuritypolicy_enabled
|
||||||
- local_volume_provisioner_namespace != "kube-system"
|
- local_volume_provisioner_namespace != "kube-system"
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
kind: ClusterRole
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
metadata:
|
||||||
|
name: psp:local-volume-provisioner
|
||||||
|
namespace: {{ local_volume_provisioner_namespace }}
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- policy
|
||||||
|
resourceNames:
|
||||||
|
- local-volume-provisioner
|
||||||
|
resources:
|
||||||
|
- podsecuritypolicies
|
||||||
|
verbs:
|
||||||
|
- use
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
- name: Registry | Append extra templates to Registry Templates list for PodSecurityPolicy
|
- name: Registry | Append extra templates to Registry Templates list for PodSecurityPolicy
|
||||||
set_fact:
|
set_fact:
|
||||||
registry_templates: "{{ registry_templates[:3] + registry_templates_for_psp + registry_templates[4:] }}"
|
registry_templates: "{{ registry_templates[:3] + registry_templates_for_psp + registry_templates[3:] }}"
|
||||||
when:
|
when:
|
||||||
- podsecuritypolicy_enabled
|
- podsecuritypolicy_enabled
|
||||||
- registry_namespace != "kube-system"
|
- registry_namespace != "kube-system"
|
||||||
|
|
Loading…
Reference in a new issue