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 #1

Updated by The Foreman Bot almost 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_ansible/pull/580 added
Actions #2

Updated by The Foreman Bot almost 2 years ago

  • Fixed in Releases foreman_ansible-11.0.0 added
Actions #3

Updated by Evgeni Golov almost 2 years ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by The Foreman Bot almost 2 years ago

  • Pull request https://github.com/theforeman/foreman_ansible/pull/585 added
Actions #5

Updated by The Foreman Bot almost 2 years ago

  • Pull request https://github.com/theforeman/foreman_ansible/pull/593 added
Actions #6

Updated by The Foreman Bot almost 2 years ago

  • Fixed in Releases foreman_ansible-10.0.0 added
Actions #7

Updated by Nofar Alfassi almost 2 years ago

  • Fixed in Releases foreman_ansible-10.4.0, foreman_ansible-11.1.0 added
  • Fixed in Releases deleted (foreman_ansible-10.0.0, foreman_ansible-11.0.0)
Actions

Also available in: Atom PDF