feat: change enc_* fact to read direct from cobbler
- change enc_role and enc_env to read direct from cobbler - cleanup profiles::base::facts
This commit is contained in:
@@ -22,7 +22,6 @@ class profiles::base (
|
||||
# include the base profiles
|
||||
include profiles::base::repos
|
||||
include profiles::packages
|
||||
include profiles::base::facts
|
||||
include profiles::base::motd
|
||||
include profiles::base::scripts
|
||||
include profiles::base::hosts
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
# a class to define some global facts
|
||||
class profiles::base::facts {
|
||||
|
||||
# The path where external facts are stored
|
||||
$facts_d_path = '/opt/puppetlabs/facter/facts.d'
|
||||
|
||||
# Ensure the directory exists
|
||||
file { $facts_d_path:
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
}
|
||||
|
||||
# cleanup old facts files
|
||||
$fact_list = [ 'enc_role', 'enc_env' ]
|
||||
$fact_list.each | String $item | {
|
||||
file { "${facts_d_path}/${item}.txt":
|
||||
ensure => absent,
|
||||
}
|
||||
}
|
||||
|
||||
# ensure the path to the custom store exists
|
||||
file { '/root/.cache':
|
||||
ensure => directory,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0750',
|
||||
}
|
||||
|
||||
# create the file that will be read
|
||||
file { '/root/.cache/custom_facts.yaml':
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
content => template('profiles/base/facts/custom_facts.yaml.erb'),
|
||||
}
|
||||
}
|
||||
@@ -8,8 +8,7 @@ class profiles::firstrun::init {
|
||||
include profiles::base::repos
|
||||
include profiles::firstrun::packages
|
||||
|
||||
# set the motd and base facts
|
||||
include profiles::base::facts
|
||||
# set the motd
|
||||
include profiles::base::motd
|
||||
|
||||
# create the sysadmin account
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
---
|
||||
enc_role: <%= @enc_role[0] %>
|
||||
enc_env: <%= @enc_env %>
|
||||
@@ -1 +0,0 @@
|
||||
enc_env=<%= @enc_env %>
|
||||
@@ -1 +0,0 @@
|
||||
enc_role=<%= @enc_role[0] %>
|
||||
Reference in New Issue
Block a user