Description of problem: Build_ami play is failing due to extra_vars openshift_release Version-Release number of selected component (if applicable): master branch How reproducible: Always Steps to Reproduce: 1. rm -rf $HOME/ansible 2. ansible-playbook -i 3.10-hosts openshift-cluster/build_ami.yml -e @provisioning_vars.yml 3. Actual results: extra_vars / openshift_release commented out TASK [openshift_repos : Enable RHEL repositories] ************************************************************************************************** task path: /home/ccallega/git/openshift-ansible/roles/openshift_repos/tasks/rhel_repos.yml:25 fatal: [ec2-18-205-28-146.compute-1.amazonaws.com]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'openshift_version' is undefined\n\nThe error appears to have been in '/home/ccallega/git/openshift-ansible/roles/openshift_repos/tasks/rhel_repos.yml': line 25, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Enable RHEL repositories\n ^ here\n" } extra_vars / openshift_release: v3.10 # per extra_vars example TASK [openshift_sanitize_inventory : Abort when openshift_release is invalid] ********************************************************************** task path: /home/ccallega/git/openshift-ansible/roles/openshift_sanitize_inventory/tasks/main.yml:22 fatal: [ec2-18-205-28-146.compute-1.amazonaws.com]: FAILED! => { "changed": false, "msg": "openshift_release is \"v3.10\" which is not a valid version string.\nPlease set openshift_release to a version string and ensure that the value is quoted, ex: openshift_release=\"3.4\"." } extra_vars / openshift_release: 3.10 TASK [openshift_sanitize_inventory : Abort when openshift_release is invalid] ********************************************************************** task path: /home/ccallega/git/openshift-ansible/roles/openshift_sanitize_inventory/tasks/main.yml:22 fatal: [ec2-18-205-28-146.compute-1.amazonaws.com]: FAILED! => { "msg": "The conditional check 'not (openshift_release is match('^\\d+(\\.\\d+){1,3}$'))' failed. The error was: Unexpected templating type error occurred on ({% if not (openshift_release is match('^\\d+(\\.\\d+){1,3}$')) %} True {% else %} False {% endif %}): expected string or buffer\n\nThe error appears to have been in '/home/ccallega/git/openshift-ansible/roles/openshift_sanitize_inventory/tasks/main.yml': line 22, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Abort when openshift_release is invalid\n ^ here\n" } extra_vars / openshift_release: '3.10' TASK [openshift_repos : Enable RHEL repositories] ************************************************************************************************** task path: /home/ccallega/git/openshift-ansible/roles/openshift_repos/tasks/rhel_repos.yml:25 fatal: [ec2-18-205-28-146.compute-1.amazonaws.com]: FAILED! => { "msg": "The task includes an option with an undefined variable. The error was: 'openshift_version' is undefined\n\nThe error appears to have been in '/home/ccallega/git/openshift-ansible/roles/openshift_repos/tasks/rhel_repos.yml': line 25, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Enable RHEL repositories\n ^ here\n" } Expected results: Play is expected to complete successfully Additional info: Description of problem: Version-Release number of the following components: rpm -q openshift-ansible rpm -q ansible ansible --version How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Please include the entire output from the last TASK line through the end of output if an error is generated Expected results: Additional info: Please attach logs from ansible-playbook with the -vvv flag
https://github.com/openshift/openshift-ansible/pull/9804
pull/9804 is merged. Please test from master.
Test version: openshift-ansible-3.11.0-0.25.0-18-gb03aaef 1) extra_vars / openshift_release commented out build_ami will uses the default values in: roles/openshift_version/defaults/main.yml 2) extra_vars / openshift_release: v3.10 3) extra_vars / openshift_release: 3.10 It's correct to reporte error, setting the wrong vaule 4) extra_vars / openshift_release: '3.10' It works well.
openshift_release is no longer a valid key in extra_vars. Please remove it completely. Retest using valid key and values in Ansible inv file
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-2018:2652