Project

General

Profile

Actions

Bug #35883

closed

undefined method `[]’ for nil:NilClass when rendering reports with no_log: true

Added by Evgeni Golov almost 2 years ago. Updated almost 2 years ago.


Description

Ohai,

when running a role with the following tasks and then viewing the Ansible report, it dies with undefined method `[]’ for nil:NilClass

- name: lol
  copy:
    content: 'lol'
    dest: '/tmp/lol.conf'
    owner: 'root'
    mode: '0750'
  no_log: true

production log:

2022-12-20T09:37:16 [W|app|96aeadb3] undefined method `[]' for nil:NilClass
2022-12-20T09:37:16 [I|app|96aeadb3] Backtrace for 'undefined method `[]' for nil:NilClass' error (ActionView::Template::Error): undefined method `[]' for nil:NilClass
 96aeadb3 | /usr/share/gems/gems/foreman_ansible-10.1.0/app/helpers/foreman_ansible/ansible_reports_helper.rb:48:in `ansible_module_message'
 96aeadb3 | /usr/share/gems/gems/foreman_ansible-10.1.0/app/views/foreman_ansible/config_reports/_ansible.html.erb:24:in `block in _1419cdbaeebc46d947f47b99d347c071'
…

Actions

Also available in: Atom PDF