Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 6, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .cakebox/Vagrantfile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -251,19 +251,19 @@ def Cakebox.configure(config, user_settings)
end
end

# Install all yaml specified "additional_software" packages
unless settings["software"].nil?
settings["software"].each do |package|
# Install additional packages from the Ubuntu Package Archive
unless settings["apt_packages"].nil?
settings["apt_packages"].each do |package|
config.vm.provision "shell" do |s|
s.privileged = false
s.inline = "bash /cakebox/console/bin/cake package add $@"
s.args = [ package["package"] ]
s.args = [package]
end
end
end

# Upload and run user created customization bash script (if found) to allow
# the user to create fully re-provisionable box customizations.
# the user to create fully re-provisionable box customizations
unless settings['user_script'].nil?
if ( settings['user_script'] =~ /^~/ )
settings['user_script'] = settings['user_script'].sub(/^~/, Dir.home)
Expand All @@ -281,7 +281,7 @@ def Cakebox.configure(config, user_settings)
end
end

# Hash cleaner, removes nil/empty values recursively from a hash
# Hash cleaner, removes nil/empty values recursively from a hash.
#
# Very handy to avoid errors when user yaml file does not include all required parts
# After removing nil values, it can safely be deep merged into default settings,
Expand Down
2 changes: 1 addition & 1 deletion Cakebox.yaml.default
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ sites:

databases:

software:
apt_packages:

user_script:
17 changes: 10 additions & 7 deletions docs/sources/usage/cakebox-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@ databases:
- name: test3.db
options: --username user123 --password pass123

software:
- package: whois
- package: phpmyadmin
apt_packages:
- whois
- phpmyadmin
- dos2unix

```

Expand Down Expand Up @@ -312,7 +313,8 @@ databases:

## Additional Software

Define "packages" to install addtional software from the Ubuntu Package Archive.
Specify Ubuntu Package Archive (apt) packages in the "apt_packages" section
so they will automatically be installed inside your box.

**Please note:**

Expand All @@ -323,7 +325,8 @@ Option | Description
package | name of the software package as used by ``apt-get install``

```yaml
additional_software:
- package: whois
- package: phpmyadmin
apt_packages:
- whois
- phpmyadmin
- dos2unix
```