PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
| Dir : /opt/puppetlabs/puppet/vendor_modules/augeas_core/spec/acceptance/tests/ |
| Server: Linux server1.ngambekcore.com 4.18.0-553.51.1.el8_10.x86_64 #1 SMP Wed Apr 30 04:00:07 EDT 2025 x86_64 IP: 159.198.77.92 |
| Dir : //opt/puppetlabs/puppet/vendor_modules/augeas_core/spec/acceptance/tests/puppet_spec.rb |
require 'spec_helper_acceptance'
RSpec.context 'Augeas puppet configuration' do
before(:all) do
agents.each do |agent|
on agent, "mv #{agent.puppet['confdir']}/puppet.conf /tmp/puppet.conf.bak"
end
end
after(:all) do
agents.each do |agent|
on agent, "cat /tmp/puppet.conf.bak > #{agent.puppet['confdir']}/puppet.conf && rm /tmp/puppet.conf.bak"
end
end
agents.each do |agent|
context "on #{agent}" do
it 'creates a new puppet config that has a master and agent section' do
puppet_conf = <<CONF
[main]
CONF
on agent, "echo \"#{puppet_conf}\" >> #{agent.puppet['confdir']}/puppet.conf"
end
it 'modifies an existing puppet config' do
on(agent, puppet_apply('--verbose'), stdin: <<MANIFEST)
augeas { 'puppet agent noop mode':
context => "/files#{agent.puppet['confdir']}/puppet.conf/agent",
incl => "/etc/puppetlabs/puppet/puppet.conf",
lens => 'Puppet.lns',
changes => 'set noop true',
}
MANIFEST
on agent, "grep 'noop=true' #{agent.puppet['confdir']}/puppet.conf"
end
end
end
end