summaryrefslogtreecommitdiff
path: root/spec/data/cookbooks/openldap
diff options
context:
space:
mode:
Diffstat (limited to 'spec/data/cookbooks/openldap')
-rw-r--r--spec/data/cookbooks/openldap/attributes/default.rb16
-rw-r--r--spec/data/cookbooks/openldap/attributes/smokey.rb1
-rw-r--r--spec/data/cookbooks/openldap/definitions/client.rb5
-rw-r--r--spec/data/cookbooks/openldap/definitions/server.rb5
-rw-r--r--spec/data/cookbooks/openldap/files/default/.dotfile1
-rw-r--r--spec/data/cookbooks/openldap/files/default/.ssh/id_rsa1
-rw-r--r--spec/data/cookbooks/openldap/files/default/remotedir/.a_dotdir/.a_dotfile_in_a_dotdir1
-rw-r--r--spec/data/cookbooks/openldap/files/default/remotedir/remote_dir_file1.txt3
-rw-r--r--spec/data/cookbooks/openldap/files/default/remotedir/remote_dir_file2.txt3
-rw-r--r--spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/.a_dotfile1
-rw-r--r--spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/remote_subdir_file1.txt3
-rw-r--r--spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/remote_subdir_file2.txt3
-rw-r--r--spec/data/cookbooks/openldap/files/default/remotedir/subdir_with_no_file_just_a_subsubdir/the_subsubdir/some_file.txt3
-rw-r--r--spec/data/cookbooks/openldap/recipes/default.rb3
-rw-r--r--spec/data/cookbooks/openldap/recipes/gigantor.rb3
-rw-r--r--spec/data/cookbooks/openldap/recipes/one.rb15
-rw-r--r--spec/data/cookbooks/openldap/templates/default/openldap_stuff.conf.erb1
-rw-r--r--spec/data/cookbooks/openldap/templates/default/openldap_variable_stuff.conf.erb1
-rw-r--r--spec/data/cookbooks/openldap/templates/default/test.erb1
19 files changed, 70 insertions, 0 deletions
diff --git a/spec/data/cookbooks/openldap/attributes/default.rb b/spec/data/cookbooks/openldap/attributes/default.rb
new file mode 100644
index 0000000000..d0756f17e3
--- /dev/null
+++ b/spec/data/cookbooks/openldap/attributes/default.rb
@@ -0,0 +1,16 @@
+chef_env ||= nil
+case chef_env
+when "prod"
+ default[:ldap_server] = "ops1prod"
+ default[:ldap_basedn] = "dc=hjksolutions,dc=com"
+ default[:ldap_replication_password] = "yes"
+when "corp"
+ default[:ldap_server] = "ops1prod"
+ default[:ldap_basedn] = "dc=hjksolutions,dc=com"
+ default[:ldap_replication_password] = "yougotit"
+else
+
+ default[:ldap_server] = "ops1prod"
+ default[:ldap_basedn] = "dc=hjksolutions,dc=com"
+ default[:ldap_replication_password] = "forsure"
+end
diff --git a/spec/data/cookbooks/openldap/attributes/smokey.rb b/spec/data/cookbooks/openldap/attributes/smokey.rb
new file mode 100644
index 0000000000..4489c6a7ac
--- /dev/null
+++ b/spec/data/cookbooks/openldap/attributes/smokey.rb
@@ -0,0 +1 @@
+default[:smokey] = "robinson"
diff --git a/spec/data/cookbooks/openldap/definitions/client.rb b/spec/data/cookbooks/openldap/definitions/client.rb
new file mode 100644
index 0000000000..ac81831d11
--- /dev/null
+++ b/spec/data/cookbooks/openldap/definitions/client.rb
@@ -0,0 +1,5 @@
+define :openldap_client, :mothra => "a big monster" do
+ cat "#{params[:name]}" do
+ pretty_kitty true
+ end
+end
diff --git a/spec/data/cookbooks/openldap/definitions/server.rb b/spec/data/cookbooks/openldap/definitions/server.rb
new file mode 100644
index 0000000000..2df437aa84
--- /dev/null
+++ b/spec/data/cookbooks/openldap/definitions/server.rb
@@ -0,0 +1,5 @@
+define :openldap_server, :mothra => "a big monster" do
+ cat "#{params[:name]}" do
+ pretty_kitty true
+ end
+end
diff --git a/spec/data/cookbooks/openldap/files/default/.dotfile b/spec/data/cookbooks/openldap/files/default/.dotfile
new file mode 100644
index 0000000000..35ae928f91
--- /dev/null
+++ b/spec/data/cookbooks/openldap/files/default/.dotfile
@@ -0,0 +1 @@
+I am here to test .dotfiles work in file directories.
diff --git a/spec/data/cookbooks/openldap/files/default/.ssh/id_rsa b/spec/data/cookbooks/openldap/files/default/.ssh/id_rsa
new file mode 100644
index 0000000000..20a3ea410a
--- /dev/null
+++ b/spec/data/cookbooks/openldap/files/default/.ssh/id_rsa
@@ -0,0 +1 @@
+FAKE KEY \ No newline at end of file
diff --git a/spec/data/cookbooks/openldap/files/default/remotedir/.a_dotdir/.a_dotfile_in_a_dotdir b/spec/data/cookbooks/openldap/files/default/remotedir/.a_dotdir/.a_dotfile_in_a_dotdir
new file mode 100644
index 0000000000..f44a956c15
--- /dev/null
+++ b/spec/data/cookbooks/openldap/files/default/remotedir/.a_dotdir/.a_dotfile_in_a_dotdir
@@ -0,0 +1 @@
+this is a dotfile in a dotdir
diff --git a/spec/data/cookbooks/openldap/files/default/remotedir/remote_dir_file1.txt b/spec/data/cookbooks/openldap/files/default/remotedir/remote_dir_file1.txt
new file mode 100644
index 0000000000..7632730912
--- /dev/null
+++ b/spec/data/cookbooks/openldap/files/default/remotedir/remote_dir_file1.txt
@@ -0,0 +1,3 @@
+# remote directory
+# file specificity: default
+# relpath: remotedir/remote_dir_file1.txt \ No newline at end of file
diff --git a/spec/data/cookbooks/openldap/files/default/remotedir/remote_dir_file2.txt b/spec/data/cookbooks/openldap/files/default/remotedir/remote_dir_file2.txt
new file mode 100644
index 0000000000..fab0433922
--- /dev/null
+++ b/spec/data/cookbooks/openldap/files/default/remotedir/remote_dir_file2.txt
@@ -0,0 +1,3 @@
+# remote directory
+# file specificity: default
+# relpath: remotedir/remote_dir_file2.txt \ No newline at end of file
diff --git a/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/.a_dotfile b/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/.a_dotfile
new file mode 100644
index 0000000000..9a2b2a4b5f
--- /dev/null
+++ b/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/.a_dotfile
@@ -0,0 +1 @@
+this is a file with a name beginning with a . dot
diff --git a/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/remote_subdir_file1.txt b/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/remote_subdir_file1.txt
new file mode 100644
index 0000000000..611294cb81
--- /dev/null
+++ b/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/remote_subdir_file1.txt
@@ -0,0 +1,3 @@
+# remote directory
+# file specificity: default
+# relpath: remotedir/remotesubdir/remote_dir_file1.txt \ No newline at end of file
diff --git a/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/remote_subdir_file2.txt b/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/remote_subdir_file2.txt
new file mode 100644
index 0000000000..e0396542a4
--- /dev/null
+++ b/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/remote_subdir_file2.txt
@@ -0,0 +1,3 @@
+# remote directory
+# file specificity: default
+# relpath: remotedir/remotesubdir/remote_dir_file2.txt \ No newline at end of file
diff --git a/spec/data/cookbooks/openldap/files/default/remotedir/subdir_with_no_file_just_a_subsubdir/the_subsubdir/some_file.txt b/spec/data/cookbooks/openldap/files/default/remotedir/subdir_with_no_file_just_a_subsubdir/the_subsubdir/some_file.txt
new file mode 100644
index 0000000000..bc47369aad
--- /dev/null
+++ b/spec/data/cookbooks/openldap/files/default/remotedir/subdir_with_no_file_just_a_subsubdir/the_subsubdir/some_file.txt
@@ -0,0 +1,3 @@
+# remote directory
+# file specificity: default
+# relpath: remotedir/subdir_with_no_file_just_a_subsubdir/the_subsubdir/some_file.txt
diff --git a/spec/data/cookbooks/openldap/recipes/default.rb b/spec/data/cookbooks/openldap/recipes/default.rb
new file mode 100644
index 0000000000..0ac8a9bb4b
--- /dev/null
+++ b/spec/data/cookbooks/openldap/recipes/default.rb
@@ -0,0 +1,3 @@
+cat "blanket" do
+ pretty_kitty true
+end
diff --git a/spec/data/cookbooks/openldap/recipes/gigantor.rb b/spec/data/cookbooks/openldap/recipes/gigantor.rb
new file mode 100644
index 0000000000..b450eca7cd
--- /dev/null
+++ b/spec/data/cookbooks/openldap/recipes/gigantor.rb
@@ -0,0 +1,3 @@
+cat "blanket" do
+ pretty_kitty false
+end
diff --git a/spec/data/cookbooks/openldap/recipes/one.rb b/spec/data/cookbooks/openldap/recipes/one.rb
new file mode 100644
index 0000000000..d2d3cfd409
--- /dev/null
+++ b/spec/data/cookbooks/openldap/recipes/one.rb
@@ -0,0 +1,15 @@
+##
+# Nodes should have a unique name
+##
+name "test.example.com-default"
+
+##
+# Nodes can set arbitrary arguments
+##
+sunshine "in"
+something "else"
+
+##
+# Nodes should have recipes
+##
+recipes "operations-master", "operations-monitoring"
diff --git a/spec/data/cookbooks/openldap/templates/default/openldap_stuff.conf.erb b/spec/data/cookbooks/openldap/templates/default/openldap_stuff.conf.erb
new file mode 100644
index 0000000000..af82f1d96c
--- /dev/null
+++ b/spec/data/cookbooks/openldap/templates/default/openldap_stuff.conf.erb
@@ -0,0 +1 @@
+slappiness is <%= node[:slappiness] -%> \ No newline at end of file
diff --git a/spec/data/cookbooks/openldap/templates/default/openldap_variable_stuff.conf.erb b/spec/data/cookbooks/openldap/templates/default/openldap_variable_stuff.conf.erb
new file mode 100644
index 0000000000..e0041c9f99
--- /dev/null
+++ b/spec/data/cookbooks/openldap/templates/default/openldap_variable_stuff.conf.erb
@@ -0,0 +1 @@
+super secret is <%= @secret -%>
diff --git a/spec/data/cookbooks/openldap/templates/default/test.erb b/spec/data/cookbooks/openldap/templates/default/test.erb
new file mode 100644
index 0000000000..f39fa7da89
--- /dev/null
+++ b/spec/data/cookbooks/openldap/templates/default/test.erb
@@ -0,0 +1 @@
+We could be diving for pearls!