Description of problem: When running openshift-ansible/playbooks/redeploy-certificates.yml without setting values for "openshift_metrics_server_install" nor for "openshift_metrics_server_install", the playbook fails with the following error: ~~~ "msg": "The conditional check 'openshift_metrics_server_install | bool' failed. The error was: error while evaluating conditional (openshift_metrics_server_install | bool): 'openshift_metrics_server_install' is undefined\n\nThe error appears to have been in '/home/quicklab/openshift-ansible/playbooks/metrics-server/private/redeploy-certificates.yml': line 13, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Create temp directory for all our templates\n ^ here\n" } ~~~ Version-Release number of the following components: $ rpm -q openshift-ansible openshift-ansible-3.11.146-1.git.0.fcedb45.el7.noarch $ rpm -q ansible ansible-2.6.19-1.el7ae.noarch $ ansible --version ansible 2.6.19 config file = /home/quicklab/ansible.cfg configured module search path = [u'/home/quicklab/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, Jun 11 2019, 14:33:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] How reproducible: Steps to Reproduce: 1. Install latest 3.11.146 cluster with default metrics values (false) 2. Modify "openshift_master_cluster_public_hostname" 3. Run "openshift-ansible/playbooks/redeploy-certificates.yml" Actual results: TASK [Create temp directory for all our templates] ******************************************************************************************************************************************* task path: /home/quicklab/openshift-ansible/playbooks/metrics-server/private/redeploy-certificates.yml:13 fatal: [10.74.178.88]: FAILED! => { "msg": "The conditional check 'openshift_metrics_server_install | bool' failed. The error was: error while evaluating conditional (openshift_metrics_server_install | bool): 'openshift_metrics_server_install' is undefined\n\nThe error appears to have been in '/home/quicklab/openshift-ansible/playbooks/metrics-server/private/redeploy-certificates.yml': line 13, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Create temp directory for all our templates\n ^ here\n" } Expected results: The workaround is to just set the following variables within the inventory or to pass them to the ansible-playbook command with "-e" openshift_metrics_install_metrics=false openshift_metrics_server_install=false (this second variable also fails when the first is fixed) Additional info: Verbose ansible-playbook (-vvv) logs are also attached.
Could reproduce this issue with openshift-ansible-3.11.146-1.git.0.fcedb45.el7.noarch.rpm TASK [Create temp directory for all our templates] ***************************** fatal: [ci-vm-10-0-149-71.hosted.upshift.rdu2.redhat.com]: FAILED! => {"msg": "The conditional check 'openshift_metrics_server_install | bool' failed. The error was: error while evaluating conditional (openshift_metrics_server_install | bool): 'openshift_metrics_server_install' is undefined\n\nThe error appears to have been in '/home/slave3/workspace/Run-Ansible-Playbooks-Nextge/private-openshift-ansible/playbooks/metrics-server/private/redeploy-certificates.yml': line 13, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Create temp directory for all our templates\n ^ here\n"} Verify this bug with using openshift-ansible-3.11.154-1.git.0.7a11cbe.el7.noarch.rpm, no such error happened.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:3817