#
# Author:: Seth Chisamore <schisamo@opscode.com>
# Cookbook Name:: nagios
# Recipe:: client_package
#
# Copyright 2011, Opscode, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

if platform?("centos", "redhat", "fedora", "amazon", "scientific")
  %w{
    nrpe
    nagios-plugins
  }.each do |pkg|
    package pkg
  end
else
  %w{
    nagios-nrpe-server
    nagios-plugins
    nagios-plugins-basic
    nagios-plugins-standard
  }.each do |pkg|
    package pkg
  end
end

#
# Author:: Seth Chisamore <schisamo@opscode.com>
# Cookbook Name:: nagios
# Recipe:: client_package
#
# Copyright 2011, Opscode, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

if platform?("centos", "redhat", "fedora", "amazon", "scientific")
  %w{
    nrpe
    nagios-plugins
  }.each do |pkg|
    package pkg
  end
  
  user node['nagios']['user'] do
    system true
  end

  group node['nagios']['group'] do
    members [ node['nagios']['user'] ]
  end
else
  %w{
    nagios-nrpe-server
    nagios-plugins
    nagios-plugins-basic
    nagios-plugins-standard
  }.each do |pkg|
    package pkg
  end
end

Add nagios user/password creation to the centos package recipe
Add nagios user/password creation to the centos package recipe


Former-commit-id: b37041964764feb5f94561cf3950b148cdd220b1 [formerly a441f0ea5965d7b953d3bd4a7703eb004b36338f] [formerly a6d2c1fcf93584a10558d7d110bf06b6fe676485 [formerly b3b32fa9863940481fc8783358fff918dcc8657a [formerly f9d043283b0cc074f987932d5ebe2b18294523f2]]]
Former-commit-id: b1f75e54ba5743e5fc3bfd744f7dfadebd2c7342 [formerly 71b4e1f59db098cb3ad2ae9f22a711ad3cf271f0]
Former-commit-id: 24154400ad992b1eca900d83dce11cd43b256622
Former-commit-id: e2600865bc240926ad4df2753f64df57b50e19ea