Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Make argparse optional on platforms where it is built into python.
Browse files Browse the repository at this point in the history
  • Loading branch information
purpleidea committed May 7, 2014
1 parent 0c9109d commit cae38f0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions manifests/xml.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}/"],
}
}

Expand Down

0 comments on commit cae38f0

Please sign in to comment.