Skip to content
Snippets Groups Projects
  • Michal Arbet's avatar
    393ee5b0
    [CI] Fix testing inventory template due Ansible 2.16.14 breakage · 393ee5b0
    Michal Arbet authored
    Ansible 2.16.14 includes a fix for CVE-2024-11079 [1], which results
    in the following error:
    
        jinja2.exceptions.UndefinedError:
            'ansible.vars.hostvars.HostVarsVars
             object' has no attribute 'ansible_host'
    
    This issue occurs because Ansible now includes `localhost` in
    `hostvars` without the `ansible_host` variable set, which
    unexpectedly breaks our test inventory rendering.
    
    This patch adds a filter to exclude `localhost`
    during the rendering process, as it is irrelevant for our purposes.
    
    [1] https://github.com/ansible/ansible/pull/84353
    
    Change-Id: Ie7ae47e5a624da31cf6cc5cd3c9239450487b8ed
    (cherry picked from commit 0298699a)
    393ee5b0
    History
    [CI] Fix testing inventory template due Ansible 2.16.14 breakage
    Michal Arbet authored
    Ansible 2.16.14 includes a fix for CVE-2024-11079 [1], which results
    in the following error:
    
        jinja2.exceptions.UndefinedError:
            'ansible.vars.hostvars.HostVarsVars
             object' has no attribute 'ansible_host'
    
    This issue occurs because Ansible now includes `localhost` in
    `hostvars` without the `ansible_host` variable set, which
    unexpectedly breaks our test inventory rendering.
    
    This patch adds a filter to exclude `localhost`
    during the rendering process, as it is irrelevant for our purposes.
    
    [1] https://github.com/ansible/ansible/pull/84353
    
    Change-Id: Ie7ae47e5a624da31cf6cc5cd3c9239450487b8ed
    (cherry picked from commit 0298699a)