Sha256: 0bd7a435b06a8d85bf43a8c9bdace9e2e70581118a6a2102892db7853c518fb5
Contents?: true
Size: 881 Bytes
Versions: 27
Compression:
Stored size: 881 Bytes
Contents
organizations = Organization.unscoped.all locations = Location.unscoped.all if ForemanOpenscap.with_remote_execution? User.as_anonymous_admin do JobTemplate.without_auditing do Dir[File.join("#{ForemanOpenscap::Engine.root}/app/views/job_templates/**/*.erb")].each do |template| sync = !Rails.env.test? && Setting[:remote_execution_sync_templates] # import! was renamed to import_raw! around 1.3.1 if JobTemplate.respond_to?('import_raw!') template = JobTemplate.import_raw!(File.read(template), :default => true, :lock => true, :update => sync) else template = JobTemplate.import!(File.read(template), :default => true, :lock => true, :update => sync) end next unless template.present? template.organizations = organizations template.locations = locations end end end end
Version data entries
27 entries across 27 versions & 1 rubygems