Merge branch 'develop' of Linux-Help/cookbook-freeipa into master

This commit is contained in:
psi-jack 2016-07-22 21:28:46 +00:00 committed by Gogs
commit a42b2a6caf
3 changed files with 7 additions and 7 deletions

View file

@ -4,7 +4,7 @@ maintainer_email 'psi-jack@linux-help.org'
license 'GPLv3'
description 'Installs/Configures freeipa'
long_description 'Installs/Configures freeipa'
version '0.1.7'
version '0.1.8'
issues_url 'http://git.linux-help.org/Linux-Help/freeipa/issues'
source_url 'http://git.linux-help.org/Linux-Help/freeipa'

View file

@ -24,9 +24,9 @@ else
include_recipe 'chef-vault'
node.normal["freeipa"]["client"] = true
freeipa_servers = search("node", "freeipa_server:true")
freeipa_clients = search("node", "freeipa_client:true")
freeipa_masters = search("node", "freeipa_master:true")
freeipa_servers = search("node", "freeipa_server:true AND chef_environment:#{node.chef_environment}")
freeipa_clients = search("node", "freeipa_client:true AND chef_environment:#{node.chef_environment}")
freeipa_masters = search("node", "freeipa_master:true AND chef_environment:#{node.chef_environment}")
unless freeipa_servers.empty? then
package "ipa-client"

View file

@ -25,8 +25,8 @@ node.normal["freeipa"]["server"] = true
if Chef::Config[:solo]
Chef::Log.warn('This recipe uses search. Chef solo does not support search.')
else
freeipa_servers = search(:node, "freeipa_server:true")
freeipa_clients = search(:node, "freeipa_client:true")
freeipa_servers = search(:node, "freeipa_server:true AND chef_environment:#{node.chef_environment}")
freeipa_clients = search(:node, "freeipa_client:true AND chef_environment:#{node.chef_environment}")
# gather data bag secrets
passwords = chef_vault_item("freeipa", 'passwords')
@ -63,7 +63,7 @@ else
# Subsequent nodes negotiate for master
# negotiate for master
freeipa_masters = search(:node, "freeipa_master:true")
freeipa_masters = search(:node, "freeipa_master:true AND chef_environment:#{node.chef_environment}")
if freeipa_masters.empty? then
##### Do master stuff