gchq / stroom-ansible

A home for all stroom related ansible playbooks, roles, etc.
Apache License 2.0
4 stars 6 forks source link

Ansible control node must support (and run) python 3 #7

Open burnalting opened 4 years ago

burnalting commented 4 years ago

If one uses Centos 7 and python2 ansible then one gains errors against the playbook in stroom/roles/non_docker_proxy/update_config/tasks/main.yml

name: Copy static files from {{ stroom_proxy_config_files_and_templates_dir }} to {{ stroom_proxy_home_dir }}/

and the playbook in stroom/roles/non_docker_stroom/update_config/tasks/main.yml

name: Copy static files from {{ stroom_config_files_and_templates_dir }}/ to {{ stroom_home_dir }}/

The error is The conditional check '_stroom_config_files_and_templates_dir_info.stat.exists == true and item.state == 'file' and item.path is not match '.*\.j2$' and item.path is not match '.*\.gitkeep$'' failed. The error was: Unexpected templating type error occurred on ({% if _stroom_config_files_and_templates_dir_info.stat.exists == true and item.state == 'file' and item.path is not match '.*\.j2$' and item.path is not match '.*\.gitkeep$' %} True {% else %} False {% endif %}): first argument must be string or compiled pattern

If one uses a control host that runs python3 by default (i.e. RHEL8/Centos8) then the above error does not occur.

at055612 commented 4 years ago

Think I may have to update the docs to say that python3 is required on the controller.