Added manifest for storage account and update readme.

This commit is contained in:
Ranjan Kumar 2014-05-08 16:16:54 +05:30
Родитель ca7352f448
Коммит 204fb22eb8
2 изменённых файлов: 70 добавлений и 2 удалений

Просмотреть файл

@ -21,9 +21,14 @@ This module requires Puppet 2.7.2 or later.
* via xml file
* SQL Database Server Management
* list, create, list sqldb servers & password reset for a sqldb server
* list, set, delete firewall rules for a sqldb server
* list, create, list sqldb servers & password reset for a sqldb server
* list, set, delete firewall rules for a sqldb server
* Storage Account Management
* create, delete, update and list storage accounts.
* Cloud Service Management
* create, delete, upload_certificate and list cloud services
Getting Started
===============

63
manifests/storage.pp Normal file
Просмотреть файл

@ -0,0 +1,63 @@
class windowsazure::storage (
$azure_management_certificate,
$azure_subscription_id,
$storage_account_name,
$description = undef,
$label = undef,
$location = undef,
$affinity_group_name = undef
) {
Exec { path => ['/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/'] }
$cmd = "puppet azure_storage create --storage-account-name ${storage_account_name} --management-certificate ${azure_management_certificate} --azure-subscription-id ${azure_subscription_id}"
if $azure_management_certificate == undef {
fail('Specify azure management certificate path.')
}
if $azure_subscription_id == undef {
fail('Specify subscription id.')
}
if $storage_account_name == undef {
fail('Storage account name is not specified for storage account.')
}
if $label != undef {
$lbl = "--label ${label}"
}
if $description != undef {
$desc = "--description ${description}"
}
if $affinity_group_name != undef {
$agn = "--affinity-group-name ${affinity_group_name}"
}
if $storage_account_name != undef {
$sac = "--storage-account-name ${storage_account_name}"
}
if $location != undef {
$loc = "--location '${location}'"
}
$puppet_command = "${cmd} ${lbl} ${desc} ${sac} ${agn} ${loc}"
if !defined( Package['azure'] ) {
package { 'azure':
ensure => '0.6.4',
provider => 'gem',
}
}
exec {"Storage Account":
command => $puppet_command,
logoutput => true,
}
Package['azure'] -> Exec['Storage Account']
}