bebox 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +78 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +163 -0
- data/LICENSE +21 -0
- data/README.md +372 -0
- data/Rakefile +8 -0
- data/bebox.gemspec +40 -0
- data/bin/bebox +5 -0
- data/lib/bebox/cli.rb +42 -0
- data/lib/bebox/commands/commands_helper.rb +33 -0
- data/lib/bebox/commands/environment_commands.rb +46 -0
- data/lib/bebox/commands/general_commands.rb +24 -0
- data/lib/bebox/commands/node_commands.rb +68 -0
- data/lib/bebox/commands/prepare_commands.rb +59 -0
- data/lib/bebox/commands/project_commands.rb +44 -0
- data/lib/bebox/commands/provision_commands.rb +145 -0
- data/lib/bebox/environment.rb +114 -0
- data/lib/bebox/logger.rb +51 -0
- data/lib/bebox/node.rb +308 -0
- data/lib/bebox/profile.rb +102 -0
- data/lib/bebox/project.rb +259 -0
- data/lib/bebox/provision.rb +257 -0
- data/lib/bebox/role.rb +103 -0
- data/lib/bebox/version.rb +3 -0
- data/lib/bebox/wizards/environment_wizard.rb +45 -0
- data/lib/bebox/wizards/node_wizard.rb +163 -0
- data/lib/bebox/wizards/profile_wizard.rb +91 -0
- data/lib/bebox/wizards/project_wizard.rb +175 -0
- data/lib/bebox/wizards/provision_wizard.rb +80 -0
- data/lib/bebox/wizards/role_wizard.rb +97 -0
- data/lib/bebox.rb +2 -0
- data/lib/deb/puppet_3.6.0/augeas-lenses_0.10.0-0ubuntu4_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/debconf-utils_1.5.42ubuntu1_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/facter_2.0.1-1puppetlabs1_amd64.deb +0 -0
- data/lib/deb/puppet_3.6.0/hiera_1.3.2-1puppetlabs1_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/libaugeas-ruby1.8_0.3.0-1.1ubuntu4_amd64.deb +0 -0
- data/lib/deb/puppet_3.6.0/libaugeas-ruby_0.3.0-1.1ubuntu4_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/libaugeas0_0.10.0-0ubuntu4_amd64.deb +0 -0
- data/lib/deb/puppet_3.6.0/libjson-ruby_1.6.3-1_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/libruby1.8_1.8.7.352-2ubuntu1.4_amd64.deb +0 -0
- data/lib/deb/puppet_3.6.0/libruby_4.8_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/libshadow-ruby1.8_1.4.1-8build1_amd64.deb +0 -0
- data/lib/deb/puppet_3.6.0/puppet-common_3.6.0-1puppetlabs1_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/puppet_3.6.0-1puppetlabs1_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/ruby-json_1.6.3-1_amd64.deb +0 -0
- data/lib/deb/puppet_3.6.0/ruby-rgen_0.6.5-1puppetlabs1_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/ruby1.8_1.8.7.352-2ubuntu1.4_amd64.deb +0 -0
- data/lib/deb/puppet_3.6.0/ruby_4.8_all.deb +0 -0
- data/lib/deb/puppet_3.6.0/virt-what_1.11-1_amd64.deb +0 -0
- data/lib/templates/node/Vagrantfile.erb +18 -0
- data/lib/templates/node/deploy_vagrant_node.erb +3 -0
- data/lib/templates/node/node.yml.erb +3 -0
- data/lib/templates/node/prepared_node.yml.erb +4 -0
- data/lib/templates/node/provisioned_node.yml.erb +4 -0
- data/lib/templates/project/Capfile.erb +2 -0
- data/lib/templates/project/Gemfile.erb +5 -0
- data/lib/templates/project/config/deploy/environment.erb +40 -0
- data/lib/templates/project/config/deploy/vagrant.erb +42 -0
- data/lib/templates/project/config/deploy.erb +120 -0
- data/lib/templates/project/dot_bebox.erb +4 -0
- data/lib/templates/project/gitignore.erb +7 -0
- data/lib/templates/project/ubuntu_dependencies +10 -0
- data/lib/templates/puppet/default_profiles/base/fundamental/ruby/Puppetfile +0 -0
- data/lib/templates/puppet/default_profiles/base/fundamental/ruby/manifests/init.pp +24 -0
- data/lib/templates/puppet/default_profiles/base/fundamental/sudo/Puppetfile +0 -0
- data/lib/templates/puppet/default_profiles/base/fundamental/sudo/manifests/init.pp +22 -0
- data/lib/templates/puppet/default_profiles/base/fundamental/users/Puppetfile +0 -0
- data/lib/templates/puppet/default_profiles/base/fundamental/users/manifests/init.pp +18 -0
- data/lib/templates/puppet/default_profiles/base/security/fail2ban/Puppetfile +2 -0
- data/lib/templates/puppet/default_profiles/base/security/fail2ban/manifests/init.pp +28 -0
- data/lib/templates/puppet/default_profiles/base/security/iptables/Puppetfile +2 -0
- data/lib/templates/puppet/default_profiles/base/security/iptables/manifests/init.pp +27 -0
- data/lib/templates/puppet/default_profiles/base/security/ssh/Puppetfile +2 -0
- data/lib/templates/puppet/default_profiles/base/security/ssh/manifests/init.pp +30 -0
- data/lib/templates/puppet/default_profiles/base/security/sysctl/Puppetfile +2 -0
- data/lib/templates/puppet/default_profiles/base/security/sysctl/manifests/init.pp +20 -0
- data/lib/templates/puppet/default_profiles/base/users/ssh/Puppetfile +2 -0
- data/lib/templates/puppet/default_profiles/base/users/ssh/manifests/init.pp +47 -0
- data/lib/templates/puppet/default_profiles/base/users/users/Puppetfile +0 -0
- data/lib/templates/puppet/default_profiles/base/users/users/manifests/init.pp +18 -0
- data/lib/templates/puppet/default_roles/fundamental/manifests/init.pp +16 -0
- data/lib/templates/puppet/default_roles/security/manifests/init.pp +17 -0
- data/lib/templates/puppet/default_roles/users/manifests/init.pp +15 -0
- data/lib/templates/puppet/profiles/Puppetfile.erb +24 -0
- data/lib/templates/puppet/profiles/manifests/init.pp.erb +17 -0
- data/lib/templates/puppet/roles/manifests/init.pp.erb +14 -0
- data/lib/templates/puppet/step-0/Puppetfile.erb +5 -0
- data/lib/templates/puppet/step-0/hiera/data/common.yaml.erb +26 -0
- data/lib/templates/puppet/step-0/hiera/data/environment.yaml.erb +26 -0
- data/lib/templates/puppet/step-0/hiera/data/node.yaml.erb +26 -0
- data/lib/templates/puppet/step-0/hiera/hiera.yaml.erb +11 -0
- data/lib/templates/puppet/step-0/manifests/node.erb +5 -0
- data/lib/templates/puppet/step-0/manifests/site.pp.erb +15 -0
- data/lib/templates/puppet/step-0/modules/rbenv/AUTHORS +11 -0
- data/lib/templates/puppet/step-0/modules/rbenv/CHANGELOG.md +70 -0
- data/lib/templates/puppet/step-0/modules/rbenv/Gemfile +8 -0
- data/lib/templates/puppet/step-0/modules/rbenv/Gemfile.lock +28 -0
- data/lib/templates/puppet/step-0/modules/rbenv/Modulefile +7 -0
- data/lib/templates/puppet/step-0/modules/rbenv/README.md +173 -0
- data/lib/templates/puppet/step-0/modules/rbenv/Rakefile +22 -0
- data/lib/templates/puppet/step-0/modules/rbenv/TODO +10 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/autospec +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/facter +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/filebucket +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/hiera +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/htmldiff +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/ldiff +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/pi +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppet +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppet-lint +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppet-module +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetca +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetd +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetdoc +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetmasterd +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetqd +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/puppetrun +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/rake +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/ralsh +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/rspec +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/bin/rspec-puppet-init +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/lib/puppet/provider/rbenvgem/default.rb +50 -0
- data/lib/templates/puppet/step-0/modules/rbenv/lib/puppet/type/rbenvgem.rb +62 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/bundle.pp +36 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/client.pp +48 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/compile.pp +102 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/definition.pp +31 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/dependencies/centos.pp +25 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/dependencies/suse.pp +28 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/dependencies/ubuntu.pp +17 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/dependencies.pp +8 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/gem.pp +29 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/install.pp +55 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/plugin/rbenvvars.pp +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/plugin/rubybuild.pp +16 -0
- data/lib/templates/puppet/step-0/modules/rbenv/manifests/plugin.pp +40 -0
- data/lib/templates/puppet/step-0/modules/rbenv/metadata.json +109 -0
- data/lib/templates/puppet/step-0/modules/rbenv/templates/Gemfile.erb +5 -0
- data/lib/templates/puppet/step-0/modules/rbenv/templates/dot.rbenvrc.erb +8 -0
- data/lib/templates/puppet/step-0/modules/stdlib/CHANGELOG.md +418 -0
- data/lib/templates/puppet/step-0/modules/stdlib/CONTRIBUTING.md +65 -0
- data/lib/templates/puppet/step-0/modules/stdlib/Gemfile +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/Gemfile.lock +166 -0
- data/lib/templates/puppet/step-0/modules/stdlib/LICENSE +19 -0
- data/lib/templates/puppet/step-0/modules/stdlib/Modulefile +11 -0
- data/lib/templates/puppet/step-0/modules/stdlib/README.markdown +1304 -0
- data/lib/templates/puppet/step-0/modules/stdlib/README_DEVELOPER.markdown +35 -0
- data/lib/templates/puppet/step-0/modules/stdlib/README_SPECS.markdown +7 -0
- data/lib/templates/puppet/step-0/modules/stdlib/RELEASE_PROCESS.markdown +24 -0
- data/lib/templates/puppet/step-0/modules/stdlib/Rakefile +18 -0
- data/lib/templates/puppet/step-0/modules/stdlib/checksums.json +349 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/facter/facter_dot_d.rb +202 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/facter/pe_version.rb +53 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/facter/puppet_vardir.rb +26 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/facter/root_home.rb +32 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/facter/util/puppet_settings.rb +21 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/abs.rb +36 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/any2array.rb +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/base64.rb +37 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/bool2num.rb +49 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/capitalize.rb +34 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/chomp.rb +35 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/chop.rb +37 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/concat.rb +41 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/count.rb +22 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/deep_merge.rb +44 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb +35 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/delete.rb +46 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/delete_at.rb +49 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/delete_undef_values.rb +34 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/delete_values.rb +26 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/difference.rb +36 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/dirname.rb +15 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/downcase.rb +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/empty.rb +28 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/ensure_packages.rb +35 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/ensure_resource.rb +45 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/flatten.rb +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/floor.rb +25 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/fqdn_rotate.rb +46 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/get_module_path.rb +17 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/getparam.rb +35 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/getvar.rb +26 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/grep.rb +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/has_interface_with.rb +52 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/has_ip_address.rb +25 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/has_ip_network.rb +25 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/has_key.rb +28 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/hash.rb +41 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/intersection.rb +34 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_array.rb +22 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_bool.rb +22 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_domain_name.rb +50 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_float.rb +30 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_function_available.rb +26 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_hash.rb +22 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_integer.rb +45 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_ip_address.rb +32 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_mac_address.rb +27 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_numeric.rb +75 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/is_string.rb +26 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/join.rb +41 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/join_keys_to_values.rb +47 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/keys.rb +26 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/loadyaml.rb +20 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/lstrip.rb +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/max.rb +21 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/member.rb +44 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/merge.rb +34 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/min.rb +21 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/num2bool.rb +43 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/parsejson.rb +24 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/parseyaml.rb +24 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/pick.rb +29 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/pick_default.rb +35 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/prefix.rb +45 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/range.rb +88 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/reject.rb +31 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/reverse.rb +28 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/rstrip.rb +32 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/shuffle.rb +46 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/size.rb +48 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/sort.rb +27 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/squeeze.rb +36 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/str2bool.rb +46 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/str2saltedsha512.rb +32 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/strftime.rb +107 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/strip.rb +39 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/suffix.rb +45 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/swapcase.rb +39 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/time.rb +49 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/to_bytes.rb +28 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/type.rb +50 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/union.rb +34 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/unique.rb +51 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/upcase.rb +41 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/uriescape.rb +35 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_absolute_path.rb +56 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_array.rb +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_augeas.rb +81 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_bool.rb +34 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_cmd.rb +48 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_ipv4_address.rb +48 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_ipv6_address.rb +49 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_re.rb +40 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_slength.rb +71 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/validate_string.rb +33 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/values.rb +39 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/values_at.rb +98 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/zip.rb +65 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/provider/file_line/ruby.rb +83 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/type/anchor.rb +46 -0
- data/lib/templates/puppet/step-0/modules/stdlib/lib/puppet/type/file_line.rb +79 -0
- data/lib/templates/puppet/step-0/modules/stdlib/manifests/init.pp +20 -0
- data/lib/templates/puppet/step-0/modules/stdlib/manifests/stages.pp +43 -0
- data/lib/templates/puppet/step-0/modules/stdlib/metadata.json +111 -0
- data/lib/templates/puppet/step-0/modules/sudo/.fixtures.yml +5 -0
- data/lib/templates/puppet/step-0/modules/sudo/.gemfile +14 -0
- data/lib/templates/puppet/step-0/modules/sudo/.gemfile.lock +43 -0
- data/lib/templates/puppet/step-0/modules/sudo/.travis.yml +34 -0
- data/lib/templates/puppet/step-0/modules/sudo/LICENSE +13 -0
- data/lib/templates/puppet/step-0/modules/sudo/Modulefile +9 -0
- data/lib/templates/puppet/step-0/modules/sudo/README.md +171 -0
- data/lib/templates/puppet/step-0/modules/sudo/Rakefile +1 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.aix +90 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.archlinux +90 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.deb +90 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.freebsd +98 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.omnios +90 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.rhel5 +97 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.rhel6 +115 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.solaris +90 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.suse +81 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.ubuntu +30 -0
- data/lib/templates/puppet/step-0/modules/sudo/files/sudoers.wheezy +17 -0
- data/lib/templates/puppet/step-0/modules/sudo/lib/augeas/lenses/fixedsudoers.aug +520 -0
- data/lib/templates/puppet/step-0/modules/sudo/manifests/allow.pp +76 -0
- data/lib/templates/puppet/step-0/modules/sudo/manifests/conf.pp +105 -0
- data/lib/templates/puppet/step-0/modules/sudo/manifests/configs.pp +24 -0
- data/lib/templates/puppet/step-0/modules/sudo/manifests/init.pp +151 -0
- data/lib/templates/puppet/step-0/modules/sudo/manifests/package/aix.pp +46 -0
- data/lib/templates/puppet/step-0/modules/sudo/manifests/package/solaris.pp +60 -0
- data/lib/templates/puppet/step-0/modules/sudo/manifests/package.pp +61 -0
- data/lib/templates/puppet/step-0/modules/sudo/manifests/params.pp +127 -0
- data/lib/templates/puppet/step-0/modules/sudo/metadata.json +59 -0
- data/lib/templates/puppet/step-0/modules/sudo/templates/users_groups.erb +9 -0
- data/lib/templates/puppet/step-0/modules/users/manifests/init.pp +15 -0
- data/lib/templates/puppet/step-0/modules/users/manifests/user.pp +50 -0
- data/lib/templates/puppet/step-1/Puppetfile.erb +5 -0
- data/lib/templates/puppet/step-1/hiera/data/common.yaml.erb +11 -0
- data/lib/templates/puppet/step-1/hiera/data/environment.yaml.erb +11 -0
- data/lib/templates/puppet/step-1/hiera/data/node.yaml.erb +11 -0
- data/lib/templates/puppet/step-1/hiera/hiera.yaml.erb +11 -0
- data/lib/templates/puppet/step-1/manifests/node.erb +5 -0
- data/lib/templates/puppet/step-1/manifests/site.pp.erb +15 -0
- data/lib/templates/puppet/step-1/modules/users/manifests/init.pp +15 -0
- data/lib/templates/puppet/step-1/modules/users/manifests/user.pp +49 -0
- data/lib/templates/puppet/step-2/Puppetfile.erb +5 -0
- data/lib/templates/puppet/step-2/hiera/data/common.yaml.erb +1 -0
- data/lib/templates/puppet/step-2/hiera/data/environment.yaml.erb +1 -0
- data/lib/templates/puppet/step-2/hiera/data/node.yaml.erb +1 -0
- data/lib/templates/puppet/step-2/hiera/hiera.yaml.erb +11 -0
- data/lib/templates/puppet/step-2/manifests/node.erb +3 -0
- data/lib/templates/puppet/step-2/manifests/site.pp.erb +10 -0
- data/lib/templates/puppet/step-3/Puppetfile.erb +5 -0
- data/lib/templates/puppet/step-3/hiera/data/common.yaml.erb +99 -0
- data/lib/templates/puppet/step-3/hiera/data/environment.yaml.erb +99 -0
- data/lib/templates/puppet/step-3/hiera/data/node.yaml.erb +99 -0
- data/lib/templates/puppet/step-3/hiera/hiera.yaml.erb +11 -0
- data/lib/templates/puppet/step-3/manifests/node.erb +5 -0
- data/lib/templates/puppet/step-3/manifests/site.pp.erb +15 -0
- data/spec/environment_spec.rb +82 -0
- data/spec/factories/environment.rb +20 -0
- data/spec/factories/node.rb +22 -0
- data/spec/factories/profile.rb +10 -0
- data/spec/factories/project.rb +17 -0
- data/spec/factories/provision.rb +13 -0
- data/spec/factories/role.rb +9 -0
- data/spec/fixtures/Capfile.test +2 -0
- data/spec/fixtures/Gemfile.test +5 -0
- data/spec/fixtures/config/deploy/environment.test +35 -0
- data/spec/fixtures/config/deploy/production.test +35 -0
- data/spec/fixtures/config/deploy/staging.test +35 -0
- data/spec/fixtures/config/deploy/vagrant.test +37 -0
- data/spec/fixtures/config/deploy.test +120 -0
- data/spec/fixtures/dot_bebox.test.erb +4 -0
- data/spec/fixtures/dot_gitignore.test +8 -0
- data/spec/fixtures/node/Vagrantfile.test.erb +18 -0
- data/spec/fixtures/node/node_0.test.erb +3 -0
- data/spec/fixtures/node/prepared_node_0.test.erb +4 -0
- data/spec/fixtures/node/provisioned_node_0.test.erb +4 -0
- data/spec/fixtures/node/vagrant_deploy.test +38 -0
- data/spec/fixtures/puppet/hiera/data/node0.server1.test.yaml.test +4 -0
- data/spec/fixtures/puppet/profiles/test/profile_0/Puppetfile.test +24 -0
- data/spec/fixtures/puppet/profiles/test/profile_0/Puppetfile_with_modules.test +20 -0
- data/spec/fixtures/puppet/profiles/test/profile_0/manifests/init.pp.test +17 -0
- data/spec/fixtures/puppet/profiles/test/profile_0/manifests/init_with_content.pp.test +22 -0
- data/spec/fixtures/puppet/roles/manifests/init.pp.test +14 -0
- data/spec/fixtures/puppet/steps/step-0/hiera/data/common.yaml.test +26 -0
- data/spec/fixtures/puppet/steps/step-0/hiera/data/node0.server1.test.yaml.test +0 -0
- data/spec/fixtures/puppet/steps/step-0/hiera/data/pname_env.yaml.test +26 -0
- data/spec/fixtures/puppet/steps/step-0/hiera/data/production.yaml.test +0 -0
- data/spec/fixtures/puppet/steps/step-0/hiera/data/staging.yaml.test +0 -0
- data/spec/fixtures/puppet/steps/step-0/hiera/data/vagrant.yaml.test +0 -0
- data/spec/fixtures/puppet/steps/step-0/hiera/hiera.yaml.test +11 -0
- data/spec/fixtures/puppet/steps/step-0/manifests/site.pp.test +10 -0
- data/spec/fixtures/puppet/steps/step-0/manifests/site_with_node.pp.test +15 -0
- data/spec/fixtures/puppet/steps/step-1/hiera/data/common.yaml.test +11 -0
- data/spec/fixtures/puppet/steps/step-1/hiera/data/node0.server1.test.yaml.test +0 -0
- data/spec/fixtures/puppet/steps/step-1/hiera/data/pname_env.yaml.test +11 -0
- data/spec/fixtures/puppet/steps/step-1/hiera/data/production.yaml.test +0 -0
- data/spec/fixtures/puppet/steps/step-1/hiera/data/staging.yaml.test +0 -0
- data/spec/fixtures/puppet/steps/step-1/hiera/data/vagrant.yaml.test +0 -0
- data/spec/fixtures/puppet/steps/step-1/hiera/hiera.yaml.test +11 -0
- data/spec/fixtures/puppet/steps/step-1/manifests/site.pp.test +10 -0
- data/spec/fixtures/puppet/steps/step-1/manifests/site_with_node.pp.test +15 -0
- data/spec/fixtures/puppet/steps/step-2/Puppetfile.test +6 -0
- data/spec/fixtures/puppet/steps/step-2/hiera/data/common.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-2/hiera/data/node0.server1.test.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-2/hiera/data/pname_env.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-2/hiera/data/production.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-2/hiera/data/staging.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-2/hiera/data/vagrant.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-2/hiera/hiera.yaml.test +11 -0
- data/spec/fixtures/puppet/steps/step-2/manifests/site.pp.test +10 -0
- data/spec/fixtures/puppet/steps/step-2/manifests/site_with_node.pp.test +13 -0
- data/spec/fixtures/puppet/steps/step-2/manifests/site_with_node_role_association.pp.test +16 -0
- data/spec/fixtures/puppet/steps/step-2/modules/profiles/manifests/test/profile_0.pp.test +17 -0
- data/spec/fixtures/puppet/steps/step-2/modules/roles/manifests/role_0.pp.test +16 -0
- data/spec/fixtures/puppet/steps/step-3/hiera/data/common.yaml.test +99 -0
- data/spec/fixtures/puppet/steps/step-3/hiera/data/node0.server1.test.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-3/hiera/data/pname_env.yaml.test +99 -0
- data/spec/fixtures/puppet/steps/step-3/hiera/data/production.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-3/hiera/data/staging.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-3/hiera/data/vagrant.yaml.test +1 -0
- data/spec/fixtures/puppet/steps/step-3/hiera/hiera.yaml.test +11 -0
- data/spec/fixtures/puppet/steps/step-3/manifests/site.pp.test +10 -0
- data/spec/fixtures/puppet/steps/step-3/manifests/site_with_node.pp.test +15 -0
- data/spec/fixtures/puppet/ubuntu_dependencies.test +10 -0
- data/spec/node0.server1.test/prepare_phase_spec.rb +53 -0
- data/spec/node0.server1.test/provision_step_0_spec.rb +46 -0
- data/spec/node0.server1.test/provision_step_1_spec.rb +41 -0
- data/spec/node0.server1.test/provision_step_2_spec.rb +79 -0
- data/spec/node0.server1.test/provision_step_3_spec.rb +76 -0
- data/spec/node_role_spec.rb +20 -0
- data/spec/node_spec.rb +71 -0
- data/spec/node_wizard_spec.rb +22 -0
- data/spec/ordered_phases_spec.rb +55 -0
- data/spec/pre_prepare_spec.rb +78 -0
- data/spec/pre_provision_steps_spec.rb +40 -0
- data/spec/profile_spec.rb +70 -0
- data/spec/project_spec.rb +195 -0
- data/spec/project_wizard_spec.rb +51 -0
- data/spec/puppet_spec_helper.rb +15 -0
- data/spec/role_profiles_spec.rb +40 -0
- data/spec/role_spec.rb +56 -0
- data/spec/spec_helper.rb +37 -0
- data/spec/support/config_specs.yaml.example +2 -0
- data/spec/vagrant_spec_helper.rb +15 -0
- metadata +625 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
define rbenv::bundle(
|
2
|
+
$home,
|
3
|
+
$user,
|
4
|
+
$group = $user,
|
5
|
+
$content = '',
|
6
|
+
$gems = ''
|
7
|
+
) {
|
8
|
+
|
9
|
+
if ( $gems ) {
|
10
|
+
$gemfile = template('rbenv/Gemfile.erb')
|
11
|
+
} elsif ( $content ) {
|
12
|
+
$gemfile = $content
|
13
|
+
} else {
|
14
|
+
fail('bundle requires either a gem list or a Gemfile')
|
15
|
+
}
|
16
|
+
|
17
|
+
file {"${user}/Gemfile":
|
18
|
+
ensure => present,
|
19
|
+
path => "${home}/Gemfile",
|
20
|
+
owner => $user,
|
21
|
+
group => $group,
|
22
|
+
content => $gemfile,
|
23
|
+
backup => false,
|
24
|
+
require => Rbenv::Client[$user],
|
25
|
+
}
|
26
|
+
|
27
|
+
exec {"${user} bundle":
|
28
|
+
command => "bundle --binstubs=${home}/bin --path=${home}/.bundle",
|
29
|
+
cwd => $home,
|
30
|
+
user => $user,
|
31
|
+
group => $group,
|
32
|
+
path => "${home}/bin:${home}/.rbenv/shims:/bin:/usr/bin",
|
33
|
+
creates => "${home}/Gemfile.lock",
|
34
|
+
subscribe => File["${user}/Gemfile"],
|
35
|
+
}
|
36
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
define rbenv::client(
|
2
|
+
$user,
|
3
|
+
$home,
|
4
|
+
$ruby,
|
5
|
+
$owner,
|
6
|
+
$source,
|
7
|
+
$rc = ".profile"
|
8
|
+
) {
|
9
|
+
if ! defined(Exec["rbenv::compile ${owner} ${ruby}"]) {
|
10
|
+
fail("Ruby version ${ruby} is not compiled for ${owner}")
|
11
|
+
}
|
12
|
+
|
13
|
+
file {"${user}/.rbenv":
|
14
|
+
ensure => link,
|
15
|
+
path => "${home}/.rbenv",
|
16
|
+
target => "${source}/.rbenv",
|
17
|
+
}
|
18
|
+
|
19
|
+
file {"${user}/${rc}":
|
20
|
+
ensure => link,
|
21
|
+
path => "${home}/${rc}",
|
22
|
+
target => "${source}/${rc}",
|
23
|
+
}
|
24
|
+
|
25
|
+
file {"${user}/.gemrc":
|
26
|
+
ensure => link,
|
27
|
+
path => "${home}/.gemrc",
|
28
|
+
target => "${source}/.gemrc",
|
29
|
+
}
|
30
|
+
|
31
|
+
file {"${user}/.rbenv-version":
|
32
|
+
ensure => present,
|
33
|
+
path => "${home}/.rbenv-version",
|
34
|
+
content => "$ruby\n",
|
35
|
+
}
|
36
|
+
|
37
|
+
file {"${user}/bin":
|
38
|
+
ensure => directory,
|
39
|
+
path => "${home}/bin",
|
40
|
+
owner => $user,
|
41
|
+
}
|
42
|
+
|
43
|
+
file {"${user}/bin/rbenv":
|
44
|
+
ensure => link,
|
45
|
+
path => "${home}/bin/rbenv",
|
46
|
+
target => "${source}/.rbenv/bin/rbenv",
|
47
|
+
}
|
48
|
+
}
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# The following part compiles and installs the chosen ruby version,
|
2
|
+
# using the "ruby-build" rbenv plugin.
|
3
|
+
#
|
4
|
+
define rbenv::compile(
|
5
|
+
$user,
|
6
|
+
$ruby = $title,
|
7
|
+
$group = $user,
|
8
|
+
$home = '',
|
9
|
+
$root = '',
|
10
|
+
$source = '',
|
11
|
+
$global = false,
|
12
|
+
$configure_opts = '--disable-install-doc',
|
13
|
+
) {
|
14
|
+
|
15
|
+
# Workaround http://projects.puppetlabs.com/issues/9848
|
16
|
+
$home_path = $home ? { '' => "/home/${user}", default => $home }
|
17
|
+
$root_path = $root ? { '' => "${home_path}/.rbenv", default => $root }
|
18
|
+
|
19
|
+
$bin = "${root_path}/bin"
|
20
|
+
$shims = "${root_path}/shims"
|
21
|
+
$versions = "${root_path}/versions"
|
22
|
+
$global_path = "${root_path}/version"
|
23
|
+
$path = [ $shims, $bin, '/bin', '/usr/bin' ]
|
24
|
+
|
25
|
+
if ! defined( Class['rbenv::dependencies'] ) {
|
26
|
+
require rbenv::dependencies
|
27
|
+
}
|
28
|
+
|
29
|
+
# If no ruby-build has been specified and the default resource hasn't been
|
30
|
+
# parsed
|
31
|
+
$custom_or_default = Rbenv::Plugin["rbenv::plugin::rubybuild::${user}"]
|
32
|
+
$default = Rbenv::Plugin::Rubybuild["rbenv::rubybuild::${user}"]
|
33
|
+
if ! defined($custom_or_default) and ! defined($default) {
|
34
|
+
debug("No ruby-build found for ${user}, going to add the default one")
|
35
|
+
rbenv::plugin::rubybuild { "rbenv::rubybuild::${user}":
|
36
|
+
user => $user,
|
37
|
+
group => $group,
|
38
|
+
home => $home,
|
39
|
+
root => $root
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
if $source {
|
44
|
+
rbenv::definition { "rbenv::definition ${user} ${ruby}":
|
45
|
+
user => $user,
|
46
|
+
group => $group,
|
47
|
+
source => $source,
|
48
|
+
ruby => $ruby,
|
49
|
+
home => $home,
|
50
|
+
root => $root,
|
51
|
+
require => Rbenv::Plugin["rbenv::plugin::rubybuild::${user}"],
|
52
|
+
before => Exec["rbenv::compile ${user} ${ruby}"]
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
# Set Timeout to disabled cause we need a lot of time to compile.
|
57
|
+
# Use HOME variable and define PATH correctly.
|
58
|
+
exec { "rbenv::compile ${user} ${ruby}":
|
59
|
+
command => "rbenv install ${ruby} && touch ${root_path}/.rehash",
|
60
|
+
timeout => 0,
|
61
|
+
user => $user,
|
62
|
+
group => $group,
|
63
|
+
cwd => $home_path,
|
64
|
+
environment => [ "HOME=${home_path}", "CONFIGURE_OPTS=${configure_opts}" ],
|
65
|
+
creates => "${versions}/${ruby}",
|
66
|
+
path => $path,
|
67
|
+
require => Rbenv::Plugin["rbenv::plugin::rubybuild::${user}"],
|
68
|
+
before => Exec["rbenv::rehash ${user} ${ruby}"],
|
69
|
+
}
|
70
|
+
|
71
|
+
exec { "rbenv::rehash ${user} ${ruby}":
|
72
|
+
command => "rbenv rehash && rm -f ${root_path}/.rehash",
|
73
|
+
user => $user,
|
74
|
+
group => $group,
|
75
|
+
cwd => $home_path,
|
76
|
+
onlyif => "[ -e '${root_path}/.rehash' ]",
|
77
|
+
environment => [ "HOME=${home_path}" ],
|
78
|
+
path => $path,
|
79
|
+
}
|
80
|
+
|
81
|
+
# Install bundler
|
82
|
+
#
|
83
|
+
rbenv::gem {"rbenv::bundler ${user} ${ruby}":
|
84
|
+
user => $user,
|
85
|
+
ruby => $ruby,
|
86
|
+
gem => 'bundler',
|
87
|
+
home => $home_path,
|
88
|
+
root => $root_path,
|
89
|
+
}
|
90
|
+
|
91
|
+
# Set default global ruby version for rbenv, if requested
|
92
|
+
#
|
93
|
+
if $global {
|
94
|
+
file { "rbenv::global ${user}":
|
95
|
+
path => $global_path,
|
96
|
+
content => "$ruby\n",
|
97
|
+
owner => $user,
|
98
|
+
group => $group,
|
99
|
+
require => Exec["rbenv::compile ${user} ${ruby}"]
|
100
|
+
}
|
101
|
+
}
|
102
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
define rbenv::definition(
|
2
|
+
$user,
|
3
|
+
$source,
|
4
|
+
$ruby = $title,
|
5
|
+
$group = $user,
|
6
|
+
$home = '',
|
7
|
+
$root = ''
|
8
|
+
) {
|
9
|
+
|
10
|
+
$home_path = $home ? { '' => "/home/${user}", default => $home }
|
11
|
+
$root_path = $root ? { '' => "${home_path}/.rbenv", default => $root }
|
12
|
+
|
13
|
+
$destination = "${root_path}/plugins/ruby-build/share/ruby-build/${ruby}"
|
14
|
+
|
15
|
+
if $source =~ /^puppet:/ {
|
16
|
+
file { "rbenv::definition-file ${user} ${ruby}":
|
17
|
+
ensure => file,
|
18
|
+
source => $source,
|
19
|
+
group => $group,
|
20
|
+
path => $destination,
|
21
|
+
require => Exec["rbenv::plugin::checkout ${user} ruby-build"],
|
22
|
+
}
|
23
|
+
} elsif $source =~ /http(s)?:/ {
|
24
|
+
exec { "rbenv::definition-file ${user} ${ruby}":
|
25
|
+
command => "wget ${source} -O ${destination}",
|
26
|
+
creates => $destination,
|
27
|
+
user => $user,
|
28
|
+
require => Exec["rbenv::plugin::checkout ${user} ruby-build"],
|
29
|
+
}
|
30
|
+
}
|
31
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
class rbenv::dependencies::centos {
|
2
|
+
|
3
|
+
# These are the "build essentials" for RHEL / CentOS
|
4
|
+
if ! defined(Package['autoconf']) { package { 'autoconf': ensure => installed } }
|
5
|
+
if ! defined(Package['automake']) { package { 'automake': ensure => installed } }
|
6
|
+
if ! defined(Package['binutils']) { package { 'binutils': ensure => installed } }
|
7
|
+
if ! defined(Package['bison']) { package { 'bison': ensure => installed } }
|
8
|
+
if ! defined(Package['flex']) { package { 'flex': ensure => installed } }
|
9
|
+
if ! defined(Package['gcc']) { package { 'gcc': ensure => installed } }
|
10
|
+
if ! defined(Package['gcc-c++']) { package { 'gcc-c++': ensure => installed } }
|
11
|
+
if ! defined(Package['gettext']) { package { 'gettext': ensure => installed } }
|
12
|
+
if ! defined(Package['libtool']) { package { 'libtool': ensure => installed } }
|
13
|
+
if ! defined(Package['make']) { package { 'make': ensure => installed } }
|
14
|
+
if ! defined(Package['patch']) { package { 'patch': ensure => installed } }
|
15
|
+
if ! defined(Package['pkgconfig']) { package { 'pkgconfig': ensure => installed } }
|
16
|
+
|
17
|
+
# Other packages required to build a proper Ruby
|
18
|
+
if ! defined(Package['readline-devel']) { package { 'readline-devel': ensure => installed } }
|
19
|
+
if ! defined(Package['openssl-devel']) { package { 'openssl-devel': ensure => installed } }
|
20
|
+
if ! defined(Package['zlib-devel']) { package { 'zlib-devel': ensure => installed } }
|
21
|
+
|
22
|
+
# Git and curl are needed for rbenv and ruby-build
|
23
|
+
if ! defined(Package['git']) { package { 'git': ensure => installed } }
|
24
|
+
if ! defined(Package['curl']) { package { 'curl': ensure => installed } }
|
25
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
class rbenv::dependencies::suse {
|
2
|
+
|
3
|
+
# These are the "build essentials" for SuSE
|
4
|
+
if ! defined(Package['autoconf']) { package { 'autoconf' : ensure => installed } }
|
5
|
+
if ! defined(Package['automake']) { package { 'automake' : ensure => installed } }
|
6
|
+
if ! defined(Package['binutils']) { package { 'binutils' : ensure => installed } }
|
7
|
+
if ! defined(Package['bison']) { package { 'bison' : ensure => installed } }
|
8
|
+
if ! defined(Package['flex']) { package { 'flex' : ensure => installed } }
|
9
|
+
if ! defined(Package['gcc']) { package { 'gcc' : ensure => installed } }
|
10
|
+
if ! defined(Package['gcc-c++']) { package { 'gcc-c++' : ensure => installed } }
|
11
|
+
if ! defined(Package['gettext']) { package { 'gettext' : ensure => installed, name => 'gettext-tools' } }
|
12
|
+
if ! defined(Package['libtool']) { package { 'libtool' : ensure => installed } }
|
13
|
+
if ! defined(Package['make']) { package { 'make' : ensure => installed } }
|
14
|
+
if ! defined(Package['patch']) { package { 'patch' : ensure => installed } }
|
15
|
+
if ! defined(Package['pkgconfig']) { package { 'pkgconfig': ensure => installed, name => 'pkg-config' } }
|
16
|
+
|
17
|
+
# Other packages required to build a proper Ruby
|
18
|
+
if ! defined(Package['readline-devel']) { package { 'readline-devel': ensure => installed } }
|
19
|
+
if ! defined(Package['openssl-devel']) { package { 'openssl-devel' : ensure => installed, name => 'libopenssl-devel'} }
|
20
|
+
if ! defined(Package['zlib-devel']) { package { 'zlib-devel' : ensure => installed } }
|
21
|
+
if ! defined(Package['libyaml-devel']) { package { 'libyaml-devel' : ensure => installed } }
|
22
|
+
if ! defined(Package['ncurses-devel']) { package { 'ncurses-devel' : ensure => installed } }
|
23
|
+
|
24
|
+
# Git and curl are needed for rbenv and ruby-build
|
25
|
+
if ! defined(Package['git']) { package { 'git' : ensure => installed } }
|
26
|
+
if ! defined(Package['curl']) { package { 'curl' : ensure => installed } }
|
27
|
+
|
28
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class rbenv::dependencies::ubuntu {
|
2
|
+
if ! defined(Package['build-essential']) { package { 'build-essential': ensure => installed } }
|
3
|
+
if ! defined(Package['libc6-dev']) { package { 'libc6-dev': ensure => installed } }
|
4
|
+
if ! defined(Package['bison']) { package { 'bison': ensure => installed } }
|
5
|
+
if ! defined(Package['openssl']) { package { 'openssl': ensure => installed } }
|
6
|
+
if ! defined(Package['libreadline6']) { package { 'libreadline6': ensure => installed } }
|
7
|
+
if ! defined(Package['libreadline6-dev']) { package { 'libreadline6-dev': ensure => installed } }
|
8
|
+
if ! defined(Package['zlib1g']) { package { 'zlib1g': ensure => installed } }
|
9
|
+
if ! defined(Package['zlib1g-dev']) { package { 'zlib1g-dev': ensure => installed } }
|
10
|
+
if ! defined(Package['libssl-dev']) { package { 'libssl-dev': ensure => installed } }
|
11
|
+
if ! defined(Package['libyaml-dev']) { package { 'libyaml-dev': ensure => installed } }
|
12
|
+
if ! defined(Package['libxml2-dev']) { package { 'libxml2-dev': ensure => installed } }
|
13
|
+
if ! defined(Package['libxslt1-dev']) { package { 'libxslt1-dev': ensure => installed, alias =>'libxslt-dev' } }
|
14
|
+
if ! defined(Package['autoconf']) { package { 'autoconf': ensure => installed } }
|
15
|
+
if ! defined(Package['git']) { package { 'git': ensure => installed, name => 'git-core' } }
|
16
|
+
if ! defined(Package['curl']) { package { 'curl': ensure => installed } }
|
17
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class rbenv::dependencies {
|
2
|
+
case $::osfamily {
|
3
|
+
debian : { require rbenv::dependencies::ubuntu }
|
4
|
+
redhat : { require rbenv::dependencies::centos }
|
5
|
+
suse : { require rbenv::dependencies::suse }
|
6
|
+
default : { notice("Could not load dependencies for ${::osfamily}") }
|
7
|
+
}
|
8
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# Install a gem under rbenv for a certain user's ruby version.
|
2
|
+
# Requires rbenv::compile for the passed in user and ruby version
|
3
|
+
#
|
4
|
+
define rbenv::gem(
|
5
|
+
$user,
|
6
|
+
$ruby,
|
7
|
+
$gem = $title,
|
8
|
+
$home = '',
|
9
|
+
$root = '',
|
10
|
+
$ensure = present
|
11
|
+
) {
|
12
|
+
|
13
|
+
# Workaround http://projects.puppetlabs.com/issues/9848
|
14
|
+
$home_path = $home ? { '' => "/home/${user}", default => $home }
|
15
|
+
$root_path = $root ? { '' => "${home_path}/.rbenv", default => $root }
|
16
|
+
|
17
|
+
if ! defined( Exec["rbenv::compile ${user} ${ruby}"] ) {
|
18
|
+
fail("Rbenv-Ruby ${ruby} for user ${user} not found in catalog")
|
19
|
+
}
|
20
|
+
|
21
|
+
rbenvgem {"${user}/${ruby}/${gem}/${ensure}":
|
22
|
+
ensure => $ensure,
|
23
|
+
user => $user,
|
24
|
+
gemname => $gem,
|
25
|
+
ruby => $ruby,
|
26
|
+
rbenv => "${root_path}/versions/${ruby}",
|
27
|
+
require => Exec["rbenv::compile ${user} ${ruby}"],
|
28
|
+
}
|
29
|
+
}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
define rbenv::install(
|
2
|
+
$user = $title,
|
3
|
+
$group = $user,
|
4
|
+
$home = '',
|
5
|
+
$root = '',
|
6
|
+
$rc = ".profile"
|
7
|
+
) {
|
8
|
+
|
9
|
+
# Workaround http://projects.puppetlabs.com/issues/9848
|
10
|
+
$home_path = $home ? { '' => "/home/${user}", default => $home }
|
11
|
+
$root_path = $root ? { '' => "${home_path}/.rbenv", default => $root }
|
12
|
+
|
13
|
+
$rbenvrc = "${home_path}/.rbenvrc"
|
14
|
+
$shrc = "${home_path}/${rc}"
|
15
|
+
|
16
|
+
if ! defined( Class['rbenv::dependencies'] ) {
|
17
|
+
require rbenv::dependencies
|
18
|
+
}
|
19
|
+
|
20
|
+
exec { "rbenv::checkout ${user}":
|
21
|
+
command => "git clone git://github.com/sstephenson/rbenv.git ${root_path}",
|
22
|
+
user => $user,
|
23
|
+
group => $group,
|
24
|
+
creates => $root_path,
|
25
|
+
path => ['/usr/bin', '/usr/sbin'],
|
26
|
+
timeout => 100,
|
27
|
+
cwd => $home_path,
|
28
|
+
require => Package['git'],
|
29
|
+
}
|
30
|
+
|
31
|
+
file { "rbenv::rbenvrc ${user}":
|
32
|
+
path => $rbenvrc,
|
33
|
+
owner => $user,
|
34
|
+
group => $group,
|
35
|
+
content => template('rbenv/dot.rbenvrc.erb'),
|
36
|
+
require => Exec["rbenv::checkout ${user}"],
|
37
|
+
}
|
38
|
+
|
39
|
+
exec { "rbenv::shrc ${user}":
|
40
|
+
command => "echo 'source ${rbenvrc}' >> ${shrc}",
|
41
|
+
user => $user,
|
42
|
+
group => $group,
|
43
|
+
unless => "grep -q rbenvrc ${shrc}",
|
44
|
+
path => ['/bin', '/usr/bin', '/usr/sbin'],
|
45
|
+
require => File["rbenv::rbenvrc ${user}"],
|
46
|
+
}
|
47
|
+
|
48
|
+
file { "rbenv::cache-dir ${user}":
|
49
|
+
owner => $user,
|
50
|
+
group => $group,
|
51
|
+
ensure => directory,
|
52
|
+
path => "${root_path}/cache",
|
53
|
+
require => Exec["rbenv::checkout ${user}"]
|
54
|
+
}
|
55
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
define rbenv::plugin::rbenvvars(
|
2
|
+
$user = $title,
|
3
|
+
$source = 'git://github.com/sstephenson/rbenv-vars.git',
|
4
|
+
$group = $user,
|
5
|
+
$home = '',
|
6
|
+
$root = ''
|
7
|
+
) {
|
8
|
+
rbenv::plugin { "rbenv::plugin::rbenvvars::${user}":
|
9
|
+
user => $user,
|
10
|
+
source => $source,
|
11
|
+
plugin_name => 'rbenv-vars',
|
12
|
+
group => $group,
|
13
|
+
home => $home,
|
14
|
+
root => $root
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
define rbenv::plugin::rubybuild(
|
2
|
+
$user = $title,
|
3
|
+
$source = 'git://github.com/sstephenson/ruby-build.git',
|
4
|
+
$group = $user,
|
5
|
+
$home = '',
|
6
|
+
$root = ''
|
7
|
+
) {
|
8
|
+
rbenv::plugin { "rbenv::plugin::rubybuild::${user}":
|
9
|
+
user => $user,
|
10
|
+
source => $source,
|
11
|
+
plugin_name => 'ruby-build',
|
12
|
+
group => $group,
|
13
|
+
home => $home,
|
14
|
+
root => $root
|
15
|
+
}
|
16
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
define rbenv::plugin(
|
2
|
+
$user,
|
3
|
+
$source,
|
4
|
+
$plugin_name = $title,
|
5
|
+
$group = $user,
|
6
|
+
$home = '',
|
7
|
+
$root = '',
|
8
|
+
$timeout = 100
|
9
|
+
) {
|
10
|
+
|
11
|
+
$home_path = $home ? { '' => "/home/${user}", default => $home }
|
12
|
+
$root_path = $root ? { '' => "${home_path}/.rbenv", default => $root }
|
13
|
+
$plugins = "${root_path}/plugins"
|
14
|
+
$destination = "${plugins}/${plugin_name}"
|
15
|
+
|
16
|
+
if $source !~ /^git:/ {
|
17
|
+
fail('Only git plugins are supported')
|
18
|
+
}
|
19
|
+
|
20
|
+
if ! defined(File["rbenv::plugins ${user}"]) {
|
21
|
+
file { "rbenv::plugins ${user}":
|
22
|
+
ensure => directory,
|
23
|
+
path => $plugins,
|
24
|
+
owner => $user,
|
25
|
+
group => $group,
|
26
|
+
require => Exec["rbenv::checkout ${user}"],
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
exec { "rbenv::plugin::checkout ${user} ${plugin_name}":
|
31
|
+
command => "git clone ${source} ${destination}",
|
32
|
+
user => $user,
|
33
|
+
group => $group,
|
34
|
+
creates => $destination,
|
35
|
+
path => ['/usr/bin', '/usr/sbin'],
|
36
|
+
timeout => $timeout,
|
37
|
+
cwd => $home_path,
|
38
|
+
require => File["rbenv::plugins ${user}"],
|
39
|
+
}
|
40
|
+
}
|
@@ -0,0 +1,109 @@
|
|
1
|
+
{
|
2
|
+
"name": "alup-rbenv",
|
3
|
+
"version": "1.2.0",
|
4
|
+
"source": "UNKNOWN",
|
5
|
+
"author": "alup",
|
6
|
+
"license": "MIT",
|
7
|
+
"summary": "rbenv Ruby Version Manager module",
|
8
|
+
"description": "Puppet module for rbenv Ruby Version Manager",
|
9
|
+
"project_page": "https://github.com/alup/puppet-rbenv",
|
10
|
+
"dependencies": [
|
11
|
+
|
12
|
+
],
|
13
|
+
"types": [
|
14
|
+
{
|
15
|
+
"name": "rbenvgem",
|
16
|
+
"doc": "A Ruby Gem installed inside an rbenv-installed Ruby",
|
17
|
+
"properties": [
|
18
|
+
{
|
19
|
+
"name": "ensure",
|
20
|
+
"doc": " Valid values are `present` (also called `installed`), `absent`, `latest`. Values can match `/./`."
|
21
|
+
}
|
22
|
+
],
|
23
|
+
"parameters": [
|
24
|
+
{
|
25
|
+
"name": "name",
|
26
|
+
"doc": "Gem qualified name within an rbenv repository"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"name": "gemname",
|
30
|
+
"doc": "The Gem name"
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"name": "ruby",
|
34
|
+
"doc": "The ruby interpreter version"
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"name": "rbenv",
|
38
|
+
"doc": "The rbenv root"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"name": "user",
|
42
|
+
"doc": "The rbenv owner"
|
43
|
+
}
|
44
|
+
],
|
45
|
+
"providers": [
|
46
|
+
{
|
47
|
+
"name": "default",
|
48
|
+
"doc": "Maintains gems inside an RBenv setup\n\nRequired binaries: `su`."
|
49
|
+
}
|
50
|
+
]
|
51
|
+
}
|
52
|
+
],
|
53
|
+
"checksums": {
|
54
|
+
"AUTHORS": "41bce6ef435e4c4fb01a3c7662477d58",
|
55
|
+
"CHANGELOG.md": "d075b1f284329fff6d5175dbb3278cbc",
|
56
|
+
"Gemfile": "f68769c7bd5266f1a4de0607fd78d17a",
|
57
|
+
"Gemfile.lock": "571d1b5c4b633773b97a88c8a2974581",
|
58
|
+
"Modulefile": "3bb3b412457d726bb0a7318ac4562fa4",
|
59
|
+
"README.md": "09fcaeb15a0ad5096f1c6f1ff6e999fb",
|
60
|
+
"Rakefile": "7bb6178549213331858bf2512a4f6a17",
|
61
|
+
"TODO": "829d2a329bf2974b9d8af868cf35db94",
|
62
|
+
"bin/autospec": "d4fde3f4a9f1e5fd339228026654cb70",
|
63
|
+
"bin/facter": "54901e1d789da4ff3303d45a6d66fc03",
|
64
|
+
"bin/filebucket": "770eee5e0fb7f1013abce8041bc9d407",
|
65
|
+
"bin/hiera": "60a41938163cc8af0b56456abcbdfcd3",
|
66
|
+
"bin/htmldiff": "8d551a540666732a11d6caa9aa3a0e68",
|
67
|
+
"bin/ldiff": "3104dda81ce6a8c0bf122df6ac851365",
|
68
|
+
"bin/pi": "b72c410b2de13e2f58526a53cdd8c6b2",
|
69
|
+
"bin/puppet": "5349ed70b05332a13b83ba8077dd0043",
|
70
|
+
"bin/puppet-lint": "7f9089954f23d779e8ce05a4a53cf440",
|
71
|
+
"bin/puppet-module": "5598cb513ff52a621e80d124010ddccb",
|
72
|
+
"bin/puppetca": "bc1f6643a1f5752c10f9cd1d967f6339",
|
73
|
+
"bin/puppetd": "90205a5cf917d78fd2be85a565b7fbc5",
|
74
|
+
"bin/puppetdoc": "93170c3ea411bce6d11d8d6fc96bdf49",
|
75
|
+
"bin/puppetmasterd": "dd139c09d5e3f04c103f4ba80221432d",
|
76
|
+
"bin/puppetqd": "f3e6ac649b6e2b9f637dee3c7e6c8c1e",
|
77
|
+
"bin/puppetrun": "de8fea72006efd65a4efd0c092e6dd39",
|
78
|
+
"bin/rake": "d09495e1a29ed0015941718d92deb28b",
|
79
|
+
"bin/ralsh": "ac7d134c175adfdd682f5b73b157e81e",
|
80
|
+
"bin/rspec": "00ed29f02ccbfaf09483109846c4a9c3",
|
81
|
+
"bin/rspec-puppet-init": "6cd42b0ad1382d8a870c1f75caf67a50",
|
82
|
+
"lib/puppet/provider/rbenvgem/default.rb": "e4f6ccda50b6b34aa1cacbb565082fa0",
|
83
|
+
"lib/puppet/type/rbenvgem.rb": "a3d2f7f9e4ce273d2d58ac86a59377c5",
|
84
|
+
"manifests/bundle.pp": "352b95944faacc82cfb15ef3e8eadd36",
|
85
|
+
"manifests/client.pp": "c6be48e076e539dfb67f64fa20dc26d6",
|
86
|
+
"manifests/compile.pp": "050f1bedccea7e4bf060baa002bf9e93",
|
87
|
+
"manifests/definition.pp": "1cfd81042f40aaf34dbb32936c2a3a3a",
|
88
|
+
"manifests/dependencies/centos.pp": "71057409e9760e3d53ad7f2a9d862874",
|
89
|
+
"manifests/dependencies/suse.pp": "fe7e6bffa09f1bc30f21f77e9c911ada",
|
90
|
+
"manifests/dependencies/ubuntu.pp": "803d58aabe0f752e5e1182b15f1991fe",
|
91
|
+
"manifests/dependencies.pp": "3a23ca0524928ae39396c451d938319e",
|
92
|
+
"manifests/gem.pp": "d4614ec9f988e707ad7b852169cb9e20",
|
93
|
+
"manifests/install.pp": "93f1a0ff0cb1b2845567871299161d79",
|
94
|
+
"manifests/plugin/rbenvvars.pp": "e9f977b7d5f4c1af85f65b60e04bf145",
|
95
|
+
"manifests/plugin/rubybuild.pp": "d8f5df37e2e4f0dbd83145f7cdabf79f",
|
96
|
+
"manifests/plugin.pp": "cd89bbf44c3418fefb26a49117957617",
|
97
|
+
"spec/classes/dependencies_spec.rb": "6f39406d29bb15e4e2b9155ae09f0daf",
|
98
|
+
"spec/defines/rbenv__compile_spec.rb": "b9e07a69c8cd7acbd887fdfba870ddd8",
|
99
|
+
"spec/defines/rbenv__definition_spec.rb": "a94134d4a5be5f021ae53489398f74a3",
|
100
|
+
"spec/defines/rbenv__install_spec.rb": "044888bc54fc109eb0c22619bca86ffb",
|
101
|
+
"spec/defines/rbenv__plugin__rbenvvars_spec.rb": "781cdf9a2a0e0f466636d981d19034b0",
|
102
|
+
"spec/defines/rbenv__plugin__rubybuild_spec.rb": "24132e11ad1558227175280ee8fda08f",
|
103
|
+
"spec/defines/rbenv__plugin_spec.rb": "0b172008a61009ceac28625f4788ff4b",
|
104
|
+
"spec/fixtures/manifests/site.pp": "d41d8cd98f00b204e9800998ecf8427e",
|
105
|
+
"spec/spec_helper.rb": "d5f3f46cba1721d2ad62fe96aad002c6",
|
106
|
+
"templates/Gemfile.erb": "c1b501d75ff589a4d2f54c1fc2674283",
|
107
|
+
"templates/dot.rbenvrc.erb": "dc88eda08086172606be9e1b4b87d90e"
|
108
|
+
}
|
109
|
+
}
|