summaryrefslogtreecommitdiffstats
path: root/manifests
diff options
context:
space:
mode:
authorJames Shubin <james@shubin.ca>2013-09-18 05:46:34 -0400
committerJames Shubin <james@shubin.ca>2013-09-18 05:46:34 -0400
commit269be1cc13c43df0e8e3a3c0babbe494ed727e60 (patch)
tree6795daa3b967f90240ab9efbd7e60ce268801241 /manifests
parent3e9feb8d9af56fc29718376fd8505f6c94e6c3b6 (diff)
downloadpuppet-gluster-269be1cc13c43df0e8e3a3c0babbe494ed727e60.tar.gz
puppet-gluster-269be1cc13c43df0e8e3a3c0babbe494ed727e60.tar.xz
puppet-gluster-269be1cc13c43df0e8e3a3c0babbe494ed727e60.zip
Updated xml parser with new features...
Diffstat (limited to 'manifests')
-rw-r--r--manifests/volume.pp2
-rw-r--r--manifests/volume/property.pp2
-rw-r--r--manifests/xml.pp5
3 files changed, 7 insertions, 2 deletions
diff --git a/manifests/volume.pp b/manifests/volume.pp
index b9db88d..b1bc712 100644
--- a/manifests/volume.pp
+++ b/manifests/volume.pp
@@ -76,7 +76,7 @@ define gluster::volume(
$others = inline_template("<%= bricks.find_all{|x| x.split(':')[0] != '${fqdn}' }.collect {|y| y.split(':')[0] }.join(' ') %>")
$fping = sprintf("/usr/sbin/fping -q %s", $others)
- $status = sprintf("/usr/sbin/gluster peer status --xml | ${vardir}/xml.py --connected %s", $others)
+ $status = sprintf("/usr/sbin/gluster peer status --xml | ${vardir}/xml.py connected %s", $others)
$onlyif = $ping ? {
false => "${status}",
diff --git a/manifests/volume/property.pp b/manifests/volume/property.pp
index e71e5d2..b0d2ad0 100644
--- a/manifests/volume/property.pp
+++ b/manifests/volume/property.pp
@@ -87,7 +87,7 @@ define gluster::volume::property(
# FIXME: check that the value we're setting isn't the default
# FIXME: you can check defaults with... gluster volume set help | ...
exec { "/usr/sbin/gluster volume set ${volume} ${key} ${safe_value}":
- unless => "/usr/bin/test \"`/usr/sbin/gluster volume --xml info ${volume} | ${vardir}/xml.py --property ${key}`\" = '${safe_value}'",
+ unless => "/usr/bin/test \"`/usr/sbin/gluster volume --xml info ${volume} | ${vardir}/xml.py property --key '${key}'`\" = '${safe_value}'",
onlyif => "/usr/sbin/gluster volume list | /bin/grep -qxF '${volume}' -",
logoutput => on_failure,
require => [
diff --git a/manifests/xml.pp b/manifests/xml.pp
index 5335cc3..82d5a02 100644
--- a/manifests/xml.pp
+++ b/manifests/xml.pp
@@ -18,6 +18,10 @@
class gluster::xml {
include gluster::vardir
+ package { 'python-argparse':
+ ensure => present,
+ }
+
package { 'python-lxml': # for parsing gluster xml output
ensure => present,
}
@@ -33,6 +37,7 @@ class gluster::xml {
backup => false, # don't backup to filebucket
ensure => present,
require => [
+ Package['python-argparse'],
Package['python-lxml'],
File["${vardir}/"],
],