Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installing augeasfacter makes usage of puppet apply unfunctional #2

Open
tuxmea opened this issue Oct 9, 2013 · 0 comments
Open

installing augeasfacter makes usage of puppet apply unfunctional #2

tuxmea opened this issue Oct 9, 2013 · 0 comments

Comments

@tuxmea
Copy link

tuxmea commented Oct 9, 2013

From puppet developer training:
extract.rb:

require 'yaml'
Puppet::Parser::Functions.newfunction(:extract, :type => :rvalue) do |args|
  raise Puppet::ParseError, "Expects 2 arguments, not #{args.size}" unless args.size == 2
  raise Puppet::ParseError, "First function must be an existing filename" unless File.exists?(args[0])
  filename = args[0]
  key = args[1]
  cnf = YAML::load_file(filename)
  cnf[key] if cnf
end

puppet apply -e "notice(extract("/etc/classes.yaml", 'classes'))"
notice: Scope(Class[main]): custom bar
notice: Finished catalog run in 0.03 seconds

puppet module install camptocamp-augeasfacter
puppet apply -e "notice(extract("/etc/classes.yaml", 'classes'))"
notice: Finished catalog run in 0.03 seconds

Standard puppet apply is not working.
But: site.pp will be parsed when using puppet apply with augeasfacter installed.

Puppet Version: PE 2.8.1 (Puppet 2.7.21) on CentOS 6.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant