Created attachment 1398983 [details] Ansible inventory and log file. Description of problem: With recent openshift-ansible, glusterfs installation fails unless "glusterfs_registry" group is also defined. Version-Release number of the following components: ansible 2.4.2.0 config file = /root/.ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /bin/ansible python version = 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] openshift-ansible-3.9.0-0.47.0-5-g9d319b8 How reproducible: Always Steps to Reproduce: 1. Install glusterfs without [glusterfs_registry] group Actual results: Failure summary: 1. Hosts: b1.lan, b2.lan, b3.lan, b8.lan Play: Load kernel modules for nodes Task: Ensure device mapper modules loaded Message: AnsibleUndefinedVariable: Unable to look up a name or access an attribute in template string (#{{ ansible_managed }} dm_thin_pool dm_multipath target_core_user {% if inventory_hostname in groups.glusterfs or inventory_hostname in groups.glusterfs_registry %} dm_snapshot dm_mirror {% endif %} ). Make sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable Expected results: Glusterfs installation works even without [glusterfs_registry] group defined. Additional info: Ansible run in the attachment. Workaround: use empty [glusterfs_registry] group in the inventory. Proposed fix (credits Matt Bruzek): --- glusterfs.conf.j2 2018-02-21 16:08:56.194000000 +0100 +++ glusterfs.conf.j2.fixed 2018-02-21 19:40:01.251000000 +0100 @@ -2,7 +2,7 @@ dm_thin_pool dm_multipath target_core_user -{% if inventory_hostname in groups.glusterfs or inventory_hostname in groups.glusterfs_registry %} +{% if ('glusterfs' in groups and inventory_hostname in groups['glusterfs']) or ('glusterfs_registry' in groups and inventory_hostname in groups['glusterfs_registry']) %} dm_snapshot dm_mirror {% endif %} With openshift-ansible-3.9.0-0.42.0-48-gdea7e61 I was able to install without any workarounds.
Bug introduced with https://github.com/openshift/openshift-ansible/pull/7028 Jose, could you take a look at this?
PR already submitted: https://github.com/openshift/openshift-ansible/pull/7237
Verified with version openshift-ansible-3.9.0-0.53.0.git.0.f8f01ef.el7. Installation works well without [glusterfs_registry] group set(set [glusterfs] group only). Remove NeedsTestCase Keyword since existing test case can cover it.
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:0489