Permalink
Browse files

Make argparse optional on platforms where it is built into python.

  • Loading branch information...
1 parent 0c9109d commit cae38f0e5e90134d997ea28b926c47ac6e7f8d6b @purpleidea committed Apr 29, 2014
Showing with 8 additions and 7 deletions.
  1. +8 −7 manifests/xml.pp
View
@@ -19,13 +19,18 @@
include gluster::vardir
include gluster::params
- package { "${::gluster::params::package_python_argparse}":
- ensure => present,
+ # argparse is built into python on new platforms and isn't needed here!
+ if "${::gluster::params::package_python_argparse}" != '' {
+ package { "${::gluster::params::package_python_argparse}":
+ ensure => present,
+ before => File["${vardir}/xml.py"],
+ }
}
# for parsing gluster xml output
package { "${::gluster::params::package_python_lxml}":
ensure => present,
+ before => File["${vardir}/xml.py"],
}
#$vardir = $::gluster::vardir::module_vardir # with trailing slash
@@ -38,11 +43,7 @@
mode => 700, # u=rwx
backup => false, # don't backup to filebucket
ensure => present,
- require => [
- Package["${::gluster::params::package_python_argparse}"],
- Package["${::gluster::params::package_python_lxml}"],
- File["${vardir}/"],
- ],
+ require => File["${vardir}/"],
}
}

0 comments on commit cae38f0

Please sign in to comment.