File: refresh-mcollective-metadata.erb

package info (click to toggle)
puppet-module-puppet-community-mcollective 0.6.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 600 kB
  • sloc: ruby: 1,301; sh: 15; makefile: 15
file content (14 lines) | stat: -rw-r--r-- 320 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!<%= @ruby_shebang_path %>
require 'rubygems'
require 'facter'
require 'facter/application'

Facter::Application.load_puppet

facts = YAML.dump(Facter.to_hash)

File.open('<%= @yaml_fact_path_real -%>.new', 'w') do |f|
  f.puts facts
end

File.rename('<%= @yaml_fact_path_real -%>.new', '<%= @yaml_fact_path_real -%>')