Sha256: 5a7c29924fce7d2f8181e1f0e2e2beb0a732ef0b5ddc1510142771d938caf96d

Contents?: true

Size: 366 Bytes

Versions: 16

Compression:

Stored size: 366 Bytes

Contents

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]
      JobTemplate.import_raw!(File.read(template), :default => true, :locked => true, :update => sync)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
foreman_remote_execution-1.5.2 db/seeds.d/70-job_templates.rb
foreman_remote_execution-1.5.1 db/seeds.d/70-job_templates.rb
foreman_remote_execution-1.5.0 db/seeds.d/70-job_templates.rb
foreman_remote_execution-1.4.6 db/seeds.d/70-job_templates.rb
foreman_remote_execution-1.4.5 db/seeds.d/70-job_templates.rb
foreman_remote_execution-1.4.4 db/seeds.d/70-job_templates.rb
foreman_remote_execution-1.4.3 db/seeds.d/70-job_templates.rb
foreman_remote_execution-1.4.2 db/seeds.d/70-job_templates.rb
foreman_remote_execution-1.3.7 db/seeds.d/70-job_templates.rb
foreman_remote_execution-1.3.6 db/seeds.d/70-job_templates.rb
foreman_remote_execution-1.4.1 db/seeds.d/70-job_templates.rb
foreman_remote_execution-1.3.5 db/seeds.d/70-job_templates.rb
foreman_remote_execution-1.3.4 db/seeds.d/70-job_templates.rb
foreman_remote_execution-1.3.3 db/seeds.d/70-job_templates.rb
foreman_remote_execution-1.3.2 db/seeds.d/70-job_templates.rb
foreman_remote_execution-1.3.1 db/seeds.d/70-job_templates.rb