Sha256: 1436477c836721635291dd0af32e2e364206df1b1531ca7175372782a48c3ce4

Contents?: true

Size: 575 Bytes

Versions: 95

Compression:

Stored size: 575 Bytes

Contents

organizations = Organization.unscoped.all
locations = Location.unscoped.all
User.as_anonymous_admin do
  JobTemplate.without_auditing do
    Dir[File.join("#{ForemanRemoteExecution::Engine.root}/app/views/templates/**/*.erb")].each do |template|
      sync = !Rails.env.test? && Setting[:remote_execution_sync_templates]
      template = JobTemplate.import_raw!(File.read(template), :default => true, :lock => true, :update => sync)
      template.organizations = organizations if template.present?
      template.locations = locations if template.present?
    end
  end
end

Version data entries

95 entries across 95 versions & 1 rubygems

Version Path
foreman_remote_execution-11.1.3 db/seeds.d/70-job_templates.rb
foreman_remote_execution-10.1.2 db/seeds.d/70-job_templates.rb
foreman_remote_execution-12.0.0 db/seeds.d/70-job_templates.rb
foreman_remote_execution-10.1.1 db/seeds.d/70-job_templates.rb
foreman_remote_execution-11.1.1 db/seeds.d/70-job_templates.rb
foreman_remote_execution-11.1.0 db/seeds.d/70-job_templates.rb
foreman_remote_execution-10.1.0 db/seeds.d/70-job_templates.rb
foreman_remote_execution-8.3.3 db/seeds.d/70-job_templates.rb
foreman_remote_execution-8.3.2 db/seeds.d/70-job_templates.rb
foreman_remote_execution-11.0.0 db/seeds.d/70-job_templates.rb
foreman_remote_execution-10.0.7 db/seeds.d/70-job_templates.rb
foreman_remote_execution-8.3.1 db/seeds.d/70-job_templates.rb
foreman_remote_execution-10.0.6 db/seeds.d/70-job_templates.rb
foreman_remote_execution-10.0.5 db/seeds.d/70-job_templates.rb
foreman_remote_execution-10.0.4 db/seeds.d/70-job_templates.rb
foreman_remote_execution-10.0.3 db/seeds.d/70-job_templates.rb
foreman_remote_execution-10.0.2 db/seeds.d/70-job_templates.rb
foreman_remote_execution-10.0.1 db/seeds.d/70-job_templates.rb
foreman_remote_execution-10.0.0 db/seeds.d/70-job_templates.rb
foreman_remote_execution-8.3.0 db/seeds.d/70-job_templates.rb