Skip to content

Commit

Permalink
Initial with test data
Browse files Browse the repository at this point in the history
  • Loading branch information
ceefour committed May 2, 2012
1 parent d92b98f commit b5e54ec
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>magento</name>
<name>puppet-magento</name>
<comment></comment>
<projects>
</projects>
Expand Down
47 changes: 46 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,52 @@
# Sample Usage:
#
# [Remember: No empty lines between comments and class definition]
class magento {
define magento(
$install = false
) {

$root = '/home/magento/sites/berbatik'
$mysql_host = 'localhost'
$mysql_user = 'berbatik_magento'
$mysql_password = 'bippo'
$mysql_dbname = 'berbatik_magento'
$url = 'http://www.berbatik.com.vm/'
$secure_url = 'http://www.berbatik.com.vm/'
$admin_firstname = 'Berbatik'
$admin_lastname = 'Sysadmin'
$admin_email = '[email protected]'
$admin_username = 'sysadmin'
$admin_password = 'admin123'

if $install {
exec { install-magento:
cwd => $root,
creates => "${root}/app/etc/local.xml",
path => '/usr/bin',
command => "php -f install.php -- \
--license_agreement_accepted \"yes\" \
--locale \"id_ID\" \
--timezone \"Asia/Bangkok\" \
--default_currency \"IDR\" \
--db_host \"${mysql_host}\" \
--db_name \"${mysql_dbname}\" \
--db_user \"${mysql_user}\" \
--db_pass \"${mysql_password}\" \
--url \"${url}\" \
--use_rewrites \"${use_rewrites}\" \
--use_secure \"no\" \
--secure_base_url \"${secure_url}\" \
--use_secure_admin \"no\" \
--skip_url_validation \"yes\" \
--admin_firstname \"${admin_firstname}\" \
--admin_lastname \"${admin_lastname}\" \
--admin_email \"${admin_email}\" \
--admin_username \"${admin_username}\" \
--admin_password \"${admin_password}\"",
logoutput => true,
user => 'magento',
require => [Exec["setting-permissions"], Exec["create-magentodb-db"]],
}
}

}
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"checksums": {
"Modulefile": "0d60817bc185db066165c629d2e46ed4",
"README": "7d49d8c7428fc20f80670ba7a1381e83",
"manifests/init.pp": "b9322b0c9ea2cb81132f164396fb50f5",
"manifests/init.pp": "a95562fa01c73c34b423e8726d107015",
"spec/spec.opts": "a600ded995d948e393fbe2320ba8e51c",
"spec/spec_helper.rb": "ca19ec4f451ebc7fdb035b52eae6e909",
"tests/init.pp": "e11cb7cdf9d56f84917d327eaadd7be0"
Expand Down

0 comments on commit b5e54ec

Please sign in to comment.