Skip to content

Commit

Permalink
(FACT-2718) Block custom facts.
Browse files Browse the repository at this point in the history
  • Loading branch information
BogdanIrimie committed Jul 27, 2020
1 parent 3a532ab commit cf15e7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 25 deletions.
7 changes: 5 additions & 2 deletions .github/actions/presuite.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'open3'
require 'fileutils'

def install_bundler
message('INSTALL BUNDLER')
Expand Down Expand Up @@ -74,8 +75,10 @@ def update_facter_lib
facter_lib_path = (HOST_PLATFORM.include? 'windows') ? facter_lib_windows_path : facter_lib_linux_path

message('OVERWRITE FACTER FILES')
run("rm -rf #{facter_lib_path} #{facter_lib_path + '.rb'}")
run("mv #{File.join(pr_facter_lib_path)} #{facter_lib_path.sub('facter', '')}")
puts FileUtils.rm_r([facter_lib_path, facter_lib_path + '.rb'], force: true)
puts run('pwd')
puts run('ls ..')
run("move \'..\\lib\\*\' \'#{facter_lib_path.sub('facter', '')}\'")
end

def run_acceptance_tests
Expand Down
24 changes: 1 addition & 23 deletions facter.conf
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
facts : {
blocklist : [ "file system", "EC2", "os.name" ],
ttls : [
{ "timezone" : 30 days },
]
}
global : {
external-dir : [ "./external_facts"],
custom-dir : [ "./custom-facts", "./custom-facts2" ],
no-external-facts : false,
no-custom-facts : false,
no-ruby : false
show-legacy : false
}

cli : {
debug : false,
trace : true,
verbose : false,
log-level : "warn"
}

fact-groups : {
cached-custom-facts : ["my_custom_fact"],
blocklist : [ "my_custom_fact" ]
}

0 comments on commit cf15e7d

Please sign in to comment.