diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-09-25 22:31:36 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-09-25 22:31:36 +0200 |
commit | 55ae94fdb6a6508f30c0eb0f5dfe95a11ac9682f (patch) | |
tree | 28f69be919f62748df8957fb6ee7f27d38199cbb /roles | |
parent | 9cd1db3fd3581ea36423a76c9a74be8054e846d4 (diff) | |
download | ands-55ae94fdb6a6508f30c0eb0f5dfe95a11ac9682f.tar.gz ands-55ae94fdb6a6508f30c0eb0f5dfe95a11ac9682f.tar.bz2 ands-55ae94fdb6a6508f30c0eb0f5dfe95a11ac9682f.tar.xz ands-55ae94fdb6a6508f30c0eb0f5dfe95a11ac9682f.zip |
Python3 compatibility
Diffstat (limited to 'roles')
7 files changed, 9 insertions, 9 deletions
diff --git a/roles/ands_facts/tasks/detect_data_path.yml b/roles/ands_facts/tasks/detect_data_path.yml index c509d1f..1577553 100644 --- a/roles/ands_facts/tasks/detect_data_path.yml +++ b/roles/ands_facts/tasks/detect_data_path.yml @@ -6,5 +6,5 @@ when: - not ands_data_path is defined - ansible_lvm.lvs[ands_data_lv] is defined - - ansible_lvm.lvs[ands_data_lv].size_g > ( ands_data_device_threshold | default(ands_data_device_default_threshold) ) + - ansible_lvm.lvs[ands_data_lv].size_g|int > ( ands_data_device_threshold | default(ands_data_device_default_threshold) ) - item.device == ands_data_dev diff --git a/roles/ands_kaas/templates/00-block-volumes.yml.j2 b/roles/ands_kaas/templates/00-block-volumes.yml.j2 index 9982d61..f313699 100644 --- a/roles/ands_kaas/templates/00-block-volumes.yml.j2 +++ b/roles/ands_kaas/templates/00-block-volumes.yml.j2 @@ -5,7 +5,7 @@ metadata: annotations: descriptions: "{{ kaas_project }} glusterfs block volumes" objects: -{% for name, vol in kaas_block_volumes.iteritems() %} +{% for name, vol in kaas_block_volumes.items() %} {% set oc_name = vol.name | default(name) | regex_replace('_','-') %} {% if oc_name | regex_search("^" + kaas_project) %} {% set pvname = oc_name %} diff --git a/roles/ands_kaas/templates/00-gfs-volumes.yml.j2 b/roles/ands_kaas/templates/00-gfs-volumes.yml.j2 index 54064e4..485733a 100644 --- a/roles/ands_kaas/templates/00-gfs-volumes.yml.j2 +++ b/roles/ands_kaas/templates/00-gfs-volumes.yml.j2 @@ -6,7 +6,7 @@ metadata: annotations: descriptions: "{{ kaas_project }} glusterfs volumes" objects: -{% for name, vol in kaas_project_volumes.iteritems() %} +{% for name, vol in kaas_project_volumes.items() %} {% set voltypes = kaas_storage_domains | json_query("[*].volumes." + vol.volume + ".type") %} {% set voltype = voltypes[0] | default('host') %} {% set mntpaths = kaas_storage_domains | json_query("[*].volumes." + vol.volume + ".mount") %} diff --git a/roles/ands_kaas/templates/00-local-volumes.yml.j2 b/roles/ands_kaas/templates/00-local-volumes.yml.j2 index a97ffae..ff47501 100644 --- a/roles/ands_kaas/templates/00-local-volumes.yml.j2 +++ b/roles/ands_kaas/templates/00-local-volumes.yml.j2 @@ -6,7 +6,7 @@ metadata: annotations: descriptions: "{{ kaas_project }} local volumes" objects: -{% for name, vol in kaas_project_local_volumes.iteritems() %} +{% for name, vol in kaas_project_local_volumes.items() %} {% set voltypes = kaas_storage_domains | json_query("[*].volumes." + vol.volume + ".type") %} {% set voltype = voltypes[0] | default('host') %} {% set mntpaths = kaas_storage_domains | json_query("[*].volumes." + vol.volume + ".mount") %} diff --git a/roles/ands_kaas/templates/40-kaas-app-builders.yml.j2 b/roles/ands_kaas/templates/40-kaas-app-builders.yml.j2 index 50bef9a..d37c4d6 100644 --- a/roles/ands_kaas/templates/40-kaas-app-builders.yml.j2 +++ b/roles/ands_kaas/templates/40-kaas-app-builders.yml.j2 @@ -13,7 +13,7 @@ metadata: labels: {{ applabels | to_json }} {% endif %} objects: -{% for name, builder in builders.iteritems() %} +{% for name, builder in builders.items() %} {% set isname = builder.name | default(name) | regex_replace('_','-') %} {% set istag = builder.version | default("latest") %} {% set bcname = isname if istag == 'latest' else isname + '-' + istag %} @@ -55,7 +55,7 @@ objects: dockerfilePath: "{{ builder.dockerfile | default('Dockerfile') }}" {% if builder.args is defined %} buildArgs: - {% for arg_name, arg_val in builder.args.iteritems() %} + {% for arg_name, arg_val in builder.args.items() %} - name: "{{ arg_name }}" value: "{{ arg_val }}" {% endfor %} diff --git a/roles/ands_kaas/templates/50-kaas-app-pods.yml.j2 b/roles/ands_kaas/templates/50-kaas-app-pods.yml.j2 index 97f620d..76ba6eb 100644 --- a/roles/ands_kaas/templates/50-kaas-app-pods.yml.j2 +++ b/roles/ands_kaas/templates/50-kaas-app-pods.yml.j2 @@ -15,7 +15,7 @@ metadata: labels: {{ applabels | to_json }} {% endif %} objects: -{% for name, pod in pods.iteritems() %} +{% for name, pod in pods.items() %} {% set kind = pod.kind | default('DeploymentConfig') %} {% set podname = pod.name | default(name) | regex_replace('_','-') %} {% if pod.enabled | default(true) %} @@ -168,7 +168,7 @@ objects: {% endif %} {% if pod.pvc is defined %} volumeClaimTemplates: - {% for name, pvc in pod.pvc.iteritems() %} + {% for name, pvc in pod.pvc.items() %} {% set pvcname = name | regex_replace('_','-') %} {% set pv = kaas_project_local_volumes[pvcname] | default({}) %} {% set oc_name = pv.name | default(pvcname) | regex_replace('_','-') %} diff --git a/roles/glusterfs/templates/export.openshift.conf.j2 b/roles/glusterfs/templates/export.openshift.conf.j2 index 85132cb..a2d1971 100644 --- a/roles/glusterfs/templates/export.openshift.conf.j2 +++ b/roles/glusterfs/templates/export.openshift.conf.j2 @@ -1,6 +1,6 @@ {% set i = 0 %} {% for domain in glusterfs_domains %} -{% for name, vol in domain.volumes.iteritems() %} +{% for name, vol in domain.volumes.items() %} {% if vol.nfs_clients is defined %} {% set nfs = vol.nfs_clients %} {% set i = i + 1 %} |