Update cookbooks and add wordpress cookbook

This commit is contained in:
Greg Karékinian
2016-02-19 18:09:49 +01:00
parent 9ba973e3ac
commit 820b0ab3f8
606 changed files with 22421 additions and 14084 deletions

View File

@@ -1,9 +1,9 @@
#
# Author:: Matt Ray <matt@opscode.com>
# Author:: Matt Ray <matt@chef.io>
# Cookbook Name:: ufw
# Recipe:: databag
#
# Copyright 2011, Opscode, Inc
# Copyright 2011-2015, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -18,12 +18,12 @@
# limitations under the License.
#
#flatten the run_list to just the names of the roles and recipes in order
# flatten the run_list to just the names of the roles and recipes in order
def run_list_names(run_list)
names = []
run_list.each do |entry|
Chef::Log.debug "ufw::databag:run_list_names+name: #{entry.name}"
if entry.name.index('::') #cookbook::recipe
if entry.name.index('::') # cookbook::recipe
names.push(entry.name.sub('::', '__'))
else
names.push(entry.name)
@@ -34,7 +34,7 @@ def run_list_names(run_list)
end
end
Chef::Log.debug "ufw::databag:run_list_names+names: #{names}"
return names
names
end
rlist = run_list_names(node.run_list)
@@ -46,13 +46,13 @@ Chef::Log.debug "ufw::databag:firewall:#{fw_db}"
rlist.each do |entry|
Chef::Log.debug "ufw::databag: \"#{entry}\""
if fw_db.member?(entry)
#add the list of firewall rules to the current list
item = data_bag_item('firewall', entry)
rules = item['rules']
node.set['firewall']['rules'].concat(rules) unless rules.nil?
end
next unless fw_db.member?(entry)
# add the list of firewall rules to the current list
item = data_bag_item('firewall', entry)
rules = item['rules']
node.set['firewall']['rules'].concat(rules) unless rules.nil?
end
#now go apply the rules
include_recipe "ufw::default"
# now go apply the rules
include_recipe 'ufw::default'