Hi,
try the following command:

foreman-rake reports:expire report_type=ForemanOpenscap::ArfReport days=30


On Monday, March 20, 2017 at 11:21:41 AM UTC+1, Cristian Falcas wrote:
>
> Also "foreman-rake reports:expire days=30" doesn't expire arf_reports.
>
> On Mon, Mar 20, 2017 at 12:17 PM, Cristian Falcas <[email protected] 
> <javascript:>> wrote:
>
>> There is the error thrown when  running the command. It looks like there 
>> is no report type ArfReport.
>>
>> # foreman-rake reports:expire report_type=ArfReport days=30
>>
>> Could not find a report of type ArfReport, please check spelling / 
>> underscore errors
>> rake aborted!
>> NameError: uninitialized constant ArfReport
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-
>> 4.2.5.1/lib/active_support/inflector/methods.rb:261:in `const_get'
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-
>> 4.2.5.1/lib/active_support/inflector/methods.rb:261:in `block in 
>> constantize'
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-
>> 4.2.5.1/lib/active_support/inflector/methods.rb:259:in `each'
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-
>> 4.2.5.1/lib/active_support/inflector/methods.rb:259:in `inject'
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-
>> 4.2.5.1/lib/active_support/inflector/methods.rb:259:in `constantize'
>> /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-
>> 4.2.5.1/lib/active_support/core_ext/string/inflections.rb:66:in 
>> `constantize'
>> /usr/share/foreman/lib/tasks/reports.rake:22:in `report_type'
>> /usr/share/foreman/lib/tasks/reports.rake:34:in `block (2 levels) in <top 
>> (required)>'
>> Tasks: TOP => reports:expire
>> (See full trace by running task with --trace)
>>
>>
>> On Fri, Mar 17, 2017 at 10:00 PM, Stephen Benjamin <[email protected] 
>> <javascript:>> wrote:
>>
>>> On Fri, Mar 17, 2017 at 10:07 AM, Cristian Falcas
>>> <[email protected] <javascript:>> wrote:
>>> > Hello,
>>> >
>>> > Is there a rake task or some other possibility to clean up the 
>>> compliance
>>> > reports? Something like "older then ...".
>>>
>>> Looking at the reports:expire task, I *think* you can do this to
>>> expire all reports older than 30 days:
>>>
>>>   foreman-rake reports:expire report_type=ArfReport days=30
>>>
>>>
>>> > Thank you,
>>> > Cristian Falcas
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google 
>>> Groups
>>> > "Foreman users" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send 
>>> an
>>> > email to [email protected] <javascript:>.
>>> > To post to this group, send email to [email protected] 
>>> <javascript:>.
>>> > Visit this group at https://groups.google.com/group/foreman-users.
>>> > For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> You received this message because you are subscribed to the Google 
>>> Groups "Foreman users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected] <javascript:>.
>>> To post to this group, send email to [email protected] 
>>> <javascript:>.
>>> Visit this group at https://groups.google.com/group/foreman-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to