Skip to content

Commit

Permalink
Adding changed_whens for role, rolebinding, and scc reconciliation ba…
Browse files Browse the repository at this point in the history
…sed on output from oadm policy command
  • Loading branch information
ewolinetz committed Feb 27, 2017
1 parent 29b5e97 commit 218f299
Showing 1 changed file with 12 additions and 4 deletions.
Expand Up @@ -173,7 +173,9 @@
- name: Reconcile Cluster Roles
command: >
{{ openshift.common.client_binary }} adm --config={{ openshift.common.config_base }}/master/admin.kubeconfig
policy reconcile-cluster-roles --additive-only=true --confirm
policy reconcile-cluster-roles --additive-only=true --confirm -o name
register: reconcile_cluster_role_result
changed_when: reconcile_cluster_role_result.stdout.length > 0
run_once: true

- name: Reconcile Cluster Role Bindings
Expand All @@ -184,19 +186,25 @@
--exclude-groups=system:authenticated:oauth
--exclude-groups=system:unauthenticated
--exclude-users=system:anonymous
--additive-only=true --confirm
--additive-only=true --confirm -o name
when: origin_reconcile_bindings | bool or ent_reconcile_bindings | bool
register: reconcile_bindings_result
change_when: reconcile_bindings_result.stdout.length > 0
run_once: true

- name: Reconcile Jenkins Pipeline Role Bindings
command: >
{{ openshift.common.client_binary }} adm --config={{ openshift.common.config_base }}/master/admin.kubeconfig policy reconcile-cluster-role-bindings system:build-strategy-jenkinspipeline --confirm
{{ openshift.common.client_binary }} adm --config={{ openshift.common.config_base }}/master/admin.kubeconfig policy reconcile-cluster-role-bindings system:build-strategy-jenkinspipeline --confirm -o name
run_once: true
register: reconcile_jenkens_role_binding_result
changed_when: reconcile_jenkins_role_binding_result.stdout.length > 0
when: openshift.common.version_gte_3_4_or_1_4 | bool

- name: Reconcile Security Context Constraints
command: >
{{ openshift.common.client_binary }} adm policy reconcile-sccs --confirm --additive-only=true
{{ openshift.common.client_binary }} adm policy reconcile-sccs --confirm --additive-only=true -o name
register: reconcile_scc_result
changed_when: reconcile_scc_result.stdout.length > 0
run_once: true

- set_fact:
Expand Down

0 comments on commit 218f299

Please sign in to comment.