Error: /Stage[main]/Abrt/File[/etc/abrt/abrt.conf]: Could not evaluate: Could not retrieve information from environment development source(s)

0 votes

I am getting the error when executing puppet on client nodes.

Error: /Stage[main]/Abrt/File[/etc/abrt/abrt-action-save-package-data.conf]: Could not evaluate: Could not retrieve information from environment development source(s) puppet:///modules/abrt//etc/abrt/abrt.conf/etc/abrt/abrt-action-save-package-data.conf

Here's my manifest:

$abrt_config = [ 'abrt.conf','abrt-action-save-package-data.conf' ]

file { $abrt_config:
  ensure => present,
  path   => "/etc/abrt/${abrt_config}",
  owner  => 'root',
  group  => 'root',
  mode   => '0644',
  source => "puppet:///modules/abrt/${abrt_config}",
}

config files are located in the following path.

/abrt/files/abrt.conf
/abrt/files/abrt-action-save-package-data.conf
Aug 7 in Puppet by Rocky
14 views

1 answer to this question.

0 votes

You cannot implicitly convert an array to a string in the source attribute like how you have done it in your code.

If you are using a non-obsolete version of Puppet, then you can use a lambda iterator to solve this problem in the following way:

['abrt.conf', 'abrt-action-save-package-data.conf'].each |$abrt_config| {
  file { $abrt_config:
    ensure => present,
    path   => "/etc/abrt/${abrt_config}",
    owner  => 'root',
    group  => 'root',
    mode   => '0644',
    source => "puppet:///modules/abrt/${abrt_config}",
  }
}

Hope this helps!

answered Aug 7 by Sirajul
• 25,420 points

Related Questions In Puppet

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
150 views
0 votes
1 answer