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, 2019 in Puppet by Rocky
426 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, 2019 by Sirajul
• 59,230 points

Related Questions In Puppet

0 votes
1 answer

Error saying "Error: Could not parse for environment production" - Puppet

Hey @Nagya, You need to set the ...READ MORE

answered Feb 15, 2019 in Puppet by Kavya
2,225 views
0 votes
1 answer

Error saying "Package[pacman]/ensure: change from absent to present failed: Could not find package pacman"

Hey @Dipti, Add --debug --verbose to see the command ...READ MORE

answered Feb 25, 2019 in Puppet by Nandita
527 views
0 votes
1 answer

Puppet: Error: Could not parse for environment production: Syntax error at '='; expected '}'

This error occurs if puppet apply -e is used ...READ MORE

answered Aug 1, 2019 in Puppet by Sirajul
• 59,230 points
4,412 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,460 views
+2 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP