diff options
Diffstat (limited to 'spec/acceptance/puppet.rb')
-rw-r--r-- | spec/acceptance/puppet.rb | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/spec/acceptance/puppet.rb b/spec/acceptance/puppet.rb deleted file mode 100644 index 2c17238..0000000 --- a/spec/acceptance/puppet.rb +++ /dev/null @@ -1,43 +0,0 @@ -test_name 'Augeas puppet configuration' do - tag 'risk:medium', - 'audit:medium', - 'audit:acceptance', - 'audit:refactor' # move to types test dir - - skip_test 'requires augeas which is included in AIO' if @options[:type] != 'aio' - - confine :except, platform: 'windows' - confine(:to, {}, hosts.reject { |host| host[:roles].include?('master') }) - - teardown 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| - step 'Backup the puppet config' do - on agent, "mv #{agent.puppet['confdir']}/puppet.conf /tmp/puppet.conf.bak" - end - step 'Create 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 - - step 'Modify the puppet.conf file' do - manifest = <<-EOF - 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', - } - EOF - on agent, puppet_apply('--verbose'), stdin: manifest - - on agent, "grep 'noop=true' #{agent.puppet['confdir']}/puppet.conf" - end - end -end |