Files
puppet-swift/manifests/init.pp
Richard Raseley 00d10f1c3e Removal of SSH Components
This change removes all SSH-related components, their configuration
options, and tests.

SSH is such a low-level service (from the perspective of any operator
deploying a cloud), that it is reasonable to assume that (or provide
direction that) SSH must be installed and configured prior to usage of
the puppet-swift module.

Without this change, there is a significant liklihood of confusion
occurring in the likely case of SSH being managed elsewhere.

Change-Id: I0f695788b2784669a3fb285e4bedf0159c4cb89a
Closes-Bug: 1447259
2015-04-24 17:23:53 +02:00

77 lines
1.5 KiB
Puppet

# Install and configure base swift components
#
# == Parameters
#
# [*swift_hash_suffix*] string of text to be used
# as a salt when hashing to determine mappings in the ring.
# This file should be the same on every node in the cluster.
#
# [*package_ensure*] The ensure state for the swift package.
# (Optional) Defaults to present.
#
# [*client_package_ensure*] The ensure state for the swift client package.
# (Optional) Defaults to present.
#
# == Dependencies
#
# None
#
# == Authors
#
# Dan Bode dan@puppetlabs.com
#
# == Copyright
#
# Copyright 2011 Puppetlabs Inc, unless otherwise noted.
#
class swift(
$swift_hash_suffix,
$package_ensure = 'present',
$client_package_ensure = 'present',
) {
include ::swift::params
if !defined(Package['swift']) {
package { 'swift':
ensure => $package_ensure,
name => $::swift::params::package_name,
tag => 'openstack',
}
}
class { '::swift::client':
ensure => $client_package_ensure;
}
File { owner => 'swift', group => 'swift', require => Package['swift'] }
file { '/home/swift':
ensure => directory,
mode => '0700',
}
file { '/etc/swift':
ensure => directory,
mode => '2770',
}
user {'swift':
ensure => present,
}
file { '/var/lib/swift':
ensure => directory,
}
file { '/var/run/swift':
ensure => directory,
}
file { '/etc/swift/swift.conf':
ensure => file,
mode => '0660',
}
swift_config { 'swift-hash/swift_hash_path_suffix':
value => $swift_hash_suffix,
}
}