Openshift 3.11 : Error /usr/share/ansible/openshift-ansible/roles/openshift_logging/tasks/generate_certs.yaml

ZatoryPrivate

If you are using Ansible 2.7, this is the problem and this is the reason:

This playbook use tasks, like this :

- name: Generate PEM certs
include_tasks: generate_pems.yaml component={{node_name}} #Problem
with_items:
- system.logging.fluentd
- system.logging.kibana
- system.logging.curator
- system.admin
loop_control:
loop_var: node_name

In Ansible 2.7 this way to use vars in the playbook are deprecated.

include_tasks/import_tasks inline variables
As of Ansible 2.7, include_tasks and import_tasks can no longer accept inline variables. Instead of using inline variables, tasks should supply variables under the vars keyword.
OLD In Ansible 2.6 (and earlier) the following was valid syntax for specifying variables:
- include_tasks: include_me.yml variable=value
NEW In Ansible 2.7 the task should be changed to use the vars keyword:
- include_tasks: include_me.yml
 vars:
 variable: value

My solution, for my case, change version ansible to 2.6:

$ sudo yum donwgrade ansible

Or changes your playbooks, but if you change Red Hat Ansible Playbooks, maybe you can lose the support :/ yea, it’s not cool, but happens!

Context: Openshift 3.11, RHEL 7.4, ansible 2.7

Cheers!