Ask Your Question
0

Write custom file to client

asked 2016-07-25 15:34:27 -0500

alexseys gravatar image

I need to configure cents 7 to auth to AD. I have to write custom sssd.conf From init.pp config class is called: class { '::realmd::sssd::config': }~> in config class i need to set contents of sssd.conf :class realmd::sssd::config {

$_sssd_config = $::realmd::sssd_config

file { $::realmd::sssd_config_file:
  content => file('realmd/files/sssd.conf'),
  owner   => 'root',
  group   => 'root',
  mode    => '0600',
  notify  => Exec['force_config_cache_rebuild'],
}
exec { 'force_config_cache_rebuild':
  command     => "/usr/bin/rm -f ${::realmd::sssd_config_cache_file}",
  refreshonly => true,

} }

But on client side I get Error: Could not retrieve catalog from remote server: Error 500 on SERVER: {"message":"Server Error: Evaluation Error: Error while evaluating a Function Call, Could not find any files from realmd/files/sssd.conf at...

It is obvious I have no clue what I am doing here, but be nice to get this working

Thank you

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-07-26 07:10:05 -0500

rajeevsharma gravatar image

You have wrong reference path for content file. Instead of

content => file('realmd/files/sssd.conf'),try

content => file('realmd/sssd.conf'),

edit flag offensive delete link more

Comments

Thank you, it worked! Now to fix rest of this......

alexseys gravatar imagealexseys ( 2016-07-26 08:49:15 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-07-25 15:34:27 -0500

Seen: 42 times

Last updated: Jul 26 '16