summaryrefslogtreecommitdiffstats
path: root/roles/openshift_logging_curator/tasks/main.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_logging_curator/tasks/main.yaml')
-rw-r--r--roles/openshift_logging_curator/tasks/main.yaml28
1 files changed, 19 insertions, 9 deletions
diff --git a/roles/openshift_logging_curator/tasks/main.yaml b/roles/openshift_logging_curator/tasks/main.yaml
index e7ef5ff22..456a25082 100644
--- a/roles/openshift_logging_curator/tasks/main.yaml
+++ b/roles/openshift_logging_curator/tasks/main.yaml
@@ -2,7 +2,7 @@
- name: Set default image variables based on deployment_type
include_vars: "{{ var_file_name }}"
with_first_found:
- - "{{ openshift_deployment_type | default(deployment_type) }}.yml"
+ - "{{ openshift_deployment_type }}.yml"
- "default_images.yml"
loop_control:
loop_var: var_file_name
@@ -14,6 +14,13 @@
- include_tasks: determine_version.yaml
+- name: Ensure that logging curator has nodes to run on
+ fail:
+ msg: |-
+ No schedulable nodes found matching node selector for logging curator - '{{ openshift_logging_curator_nodeselector }}'
+ when:
+ - openshift_schedulable_node_labels | lib_utils_oo_has_no_matching_selector(openshift_logging_curator_nodeselector)
+
# allow passing in a tempdir
- name: Create temp directory for doing work in
command: mktemp -d /tmp/openshift-logging-ansible-XXXXXX
@@ -52,16 +59,19 @@
# configmap
- copy:
- src: curator.yml
+ src: "{{ __base_file_dir }}/curator.yml"
dest: "{{ tempdir }}/curator.yml"
- when: curator_config_contents is undefined
changed_when: no
-- copy:
- content: "{{ curator_config_contents }}"
- dest: "{{ tempdir }}/curator.yml"
- when: curator_config_contents is defined
- changed_when: no
+- import_role:
+ name: openshift_logging
+ tasks_from: patch_configmap_files.yaml
+ vars:
+ configmap_name: "logging-curator"
+ configmap_namespace: "logging"
+ configmap_file_names:
+ - current_file: "config.yaml"
+ new_file: "{{ tempdir }}/curator.yml"
- name: Set Curator configmap
oc_configmap:
@@ -93,7 +103,7 @@
# TODO: scale should not exceed 1
- name: Generate Curator deploymentconfig
template:
- src: curator.j2
+ src: "{{ __base_file_dir }}/curator.j2"
dest: "{{ tempdir }}/templates/curator-dc.yaml"
vars:
component: "{{ curator_component }}"