Skip to content

Commit e2ff968

Browse files
committed
Fix Ansible Jinja templates
With a new verion of Ansible we are getting a warning that usage of the variables in jinja template will be deprecated. This changes all occurrences to the suggested variant. Signed-off-by: Ales Raszka <araszka@redhat.com>
1 parent f9bb6ce commit e2ff968

9 files changed

Lines changed: 18 additions & 18 deletions

File tree

ansible/roles/config_ocp_cluster/tasks/chat-trigger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
apply: true
1010
validate_certs: "{{ k8s_validate_certs }}"
1111
namespace: "{{ pipelinerun_listener_namespace }}"
12-
definition: "{{ lookup('file', '{{ item }}') }}"
12+
definition: "{{ lookup('file', item) }}"
1313
with_fileglob:
1414
- ../files/tasks/*
1515

ansible/roles/config_ocp_cluster/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
kubernetes.core.k8s:
66
state: present
77
validate_certs: "{{ k8s_validate_certs }}"
8-
definition: "{{ lookup('file', '{{ item }}') }}"
8+
definition: "{{ lookup('file', item) }}"
99
with_items:
1010
- ../files/tektonconfig.yml
1111

ansible/roles/config_ocp_cluster/tasks/metrics-trigger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace: "{{ pipelinerun_listener_namespace }}"
99
state: present
1010
validate_certs: "{{ k8s_validate_certs }}"
11-
definition: "{{ lookup('file', '{{ item }}') }}"
11+
definition: "{{ lookup('file', item) }}"
1212
with_items:
1313
- ../templates/openshift/update-metrics.yml
1414
- ../templates/openshift/metrics-pipeline.yml

ansible/roles/index_signature_verification/tasks/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
apply: true
1717
validate_certs: "{{ k8s_validate_certs }}"
1818
namespace: "{{ k8s_namespace }}"
19-
definition: "{{ lookup('file', '{{ item }}') }}"
19+
definition: "{{ lookup('file', item) }}"
2020
with_fileglob:
2121
- ../files/configmaps/*
2222

@@ -26,7 +26,7 @@
2626
apply: true
2727
validate_certs: "{{ k8s_validate_certs }}"
2828
namespace: "{{ k8s_namespace }}"
29-
definition: "{{ lookup('file', '{{ item }}') }}"
29+
definition: "{{ lookup('file', item) }}"
3030
with_fileglob:
3131
- ../files/tasks/*
3232

@@ -36,7 +36,7 @@
3636
apply: true
3737
validate_certs: "{{ k8s_validate_certs }}"
3838
namespace: "{{ k8s_namespace }}"
39-
definition: "{{ lookup('file', '{{ item }}') }}"
39+
definition: "{{ lookup('file', item) }}"
4040
with_fileglob:
4141
- ../files/pipelines/*
4242

ansible/roles/operator-pipeline/tasks/index-img-bootstrap-signing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
state: present
116116
apply: true
117117
namespace: "{{ oc_index_bootstrap_namespace }}"
118-
definition: "{{ lookup('template', '{{ item }}') }}"
118+
definition: "{{ lookup('template', item) }}"
119119
with_items:
120120
- ../templates/openshift/tasks/set-env.yml
121121
- ../templates/openshift/tasks/index-signing-image-check.yml
@@ -129,6 +129,6 @@
129129
state: present
130130
apply: true
131131
namespace: "{{ oc_index_bootstrap_namespace }}"
132-
definition: "{{ lookup('template', '{{ item }}') }}"
132+
definition: "{{ lookup('template', item) }}"
133133
with_items:
134134
- ../templates/openshift/pipelines/index-img-bootstrap-signing-pipeline.yml

ansible/roles/operator-pipeline/tasks/index-img-signing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
state: present
2424
apply: true
2525
namespace: "{{ oc_signing_namespace }}"
26-
definition: "{{ lookup('template', '{{ item }}') }}"
26+
definition: "{{ lookup('template', item) }}"
2727
with_items:
2828
- ../templates/openshift/tasks/set-env.yml
2929

@@ -35,6 +35,6 @@
3535
state: present
3636
apply: true
3737
namespace: "{{ oc_signing_namespace }}"
38-
definition: "{{ lookup('template', '{{ item }}') }}"
38+
definition: "{{ lookup('template', item) }}"
3939
with_items:
4040
- ../templates/openshift/pipelines/index-img-signing-pipeline.yml

ansible/roles/operator-pipeline/tasks/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
kubernetes.core.k8s:
1717
state: present
1818
apply: true
19-
definition: "{{ lookup('template', '{{ item }}') }}"
19+
definition: "{{ lookup('template', item) }}"
2020
with_items:
2121
- ../templates/openshift/openshift-pipelines-custom-scc.yml
2222
- ../templates/openshift/openshift-pipeline-sa-scc-role.yml
@@ -29,7 +29,7 @@
2929
state: present
3030
apply: true
3131
namespace: "{{ oc_namespace }}"
32-
definition: "{{ lookup('template', '{{ item }}') }}"
32+
definition: "{{ lookup('template', item) }}"
3333
with_fileglob:
3434
- ../templates/openshift/tasks/*
3535

@@ -40,7 +40,7 @@
4040
state: present
4141
apply: true
4242
namespace: "{{ oc_namespace }}"
43-
definition: "{{ lookup('template', '{{ item }}') }}"
43+
definition: "{{ lookup('template', item) }}"
4444
with_items:
4545
- ../templates/openshift/pipelines/operator-hosted-pipeline.yml
4646
- ../templates/openshift/pipelines/operator-release-pipeline.yml
@@ -52,7 +52,7 @@
5252
state: present
5353
apply: true
5454
namespace: "{{ oc_namespace }}"
55-
definition: "{{ lookup('template', '{{ item }}') }}"
55+
definition: "{{ lookup('template', item) }}"
5656
with_items:
5757
- ../templates/openshift/pipelines/operator-ci-pipeline.yml
5858

ansible/roles/operator-pipeline/tasks/webhook-dispatcher.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
state: present
2727
apply: true
2828
namespace: "{{ oc_namespace }}"
29-
definition: "{{ lookup('template', '{{ item }}') }}"
29+
definition: "{{ lookup('template', item) }}"
3030
loop:
3131
- ../templates/openshift/webhook_dispatcher/postgres-db-stateful-set.yml
3232
- ../templates/openshift/webhook_dispatcher/postgres-db-service.yml
@@ -61,14 +61,14 @@
6161
suffix: "{{ suffix }}"
6262
env: "{{ env }}"
6363
data:
64-
dispatcher-config.yml: "{{ lookup('template', '{{ operator_pipeline_webhook_dispatcher_config_file }}') }}"
64+
dispatcher-config.yml: "{{ lookup('template', operator_pipeline_webhook_dispatcher_config_file) }}"
6565

6666
- name: Deploy webhook dispatcher
6767
kubernetes.core.k8s:
6868
state: present
6969
apply: true
7070
namespace: "{{ oc_namespace }}"
71-
definition: "{{ lookup('template', '{{ item }}') }}"
71+
definition: "{{ lookup('template', item) }}"
7272
loop:
7373
- "../templates/openshift/webhook_dispatcher/webhook-dispatcher-deployment.yml"
7474
- "../templates/openshift/webhook_dispatcher/webhook-dispatcher-service.yml"

ansible/roles/operator-pipeline/templates/openshift/webhook_dispatcher/webhook-dispatcher-deployment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec:
1818
labels:
1919
app: "{{ operator_pipeline_webhook_dispatcher_name }}"
2020
annotations:
21-
checksum/config: "{{ lookup('file', '{{ operator_pipeline_webhook_dispatcher_config_file }}') | checksum }}"
21+
checksum/config: "{{ lookup('file', operator_pipeline_webhook_dispatcher_config_file) | checksum }}"
2222
spec:
2323
serviceAccountName: "{{ operator_pipeline_webhook_dispatcher_name }}"
2424
containers:

0 commit comments

Comments
 (0)