summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2013-04-02 16:01:40 -0400
committerMicah Anderson <micah@riseup.net>2013-04-02 16:24:28 -0400
commit9740f84b96c3343436ade17cd31320e164b28874 (patch)
treecf52a02f8ca35a0dec18b9e38c3bd0d60a398dc5
parent3a10caaa7be94929a2675d9ef69d306f65f65e8e (diff)
minor formatting/linting cleanup
-rw-r--r--manifests/base.pp11
-rw-r--r--manifests/cert.pp4
-rw-r--r--manifests/init.pp14
-rw-r--r--manifests/remote_host.pp4
4 files changed, 17 insertions, 16 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index 1a0b4bf..3f1d491 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -1,14 +1,15 @@
# manage strongswan services
class strongswan::base {
- package{'strongswan':
- ensure => installed,
+ package { 'strongswan':
+ ensure => installed,
require => Package['monkeysphere','gnutls-utils'];
- } -> exec{
+ } -> exec {
'ipsec_privatekey':
command => "certtool --generate-privkey --bits 2048 --outfile ${strongswan::cert_dir}/private/${::fqdn}.pem",
creates => "${strongswan::cert_dir}/private/${::fqdn}.pem";
- } -> exec{'ipsec_monkeysphere_cert':
+ } -> exec {
+ 'ipsec_monkeysphere_cert':
command => "monkeysphere-host import-key ${strongswan::cert_dir}/private/${::fqdn}.pem ike://${::fqdn} && gpg --homedir /var/lib/monkeysphere/host -a --export =ike://${::fqdn} > ${strongswan::cert_dir}/certs/${::fqdn}.asc",
creates => "${strongswan::cert_dir}/certs/${::fqdn}.asc",
} -> anchor{'strongswan::certs::done': }
@@ -46,7 +47,7 @@ class strongswan::base {
mode => '0500';
}
- service{'ipsec':
+ service { 'ipsec':
ensure => running,
enable => true,
}
diff --git a/manifests/cert.pp b/manifests/cert.pp
index ae7e5ef..6b9f685 100644
--- a/manifests/cert.pp
+++ b/manifests/cert.pp
@@ -1,5 +1,5 @@
# manage a cert snippet that we want to include
-define strongswan::cert(
+define strongswan::cert (
$ensure = 'present',
$cert = 'absent'
) {
@@ -7,7 +7,7 @@ define strongswan::cert(
fail("You need to pass some \$cert content for ${name} if it should be present")
}
- file{"${strongswan::cert_dir}/certs/${name}.asc":
+ file { "${strongswan::cert_dir}/certs/${name}.asc":
ensure => $ensure,
require => Package['strongswan'],
notify => Service['ipsec'],
diff --git a/manifests/init.pp b/manifests/init.pp
index f2b3bd3..9277ef0 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -10,9 +10,9 @@ class strongswan(
$auto_remote_host = false
) {
- class{'monkeysphere':
+ class { 'monkeysphere':
publish_key => $monkeysphere_publish_key
- } -> class{'certtool': }
+ } -> class { 'certtool': }
case $::operatingsystem {
centos: {
@@ -22,7 +22,7 @@ class strongswan(
$cert_dir = '/etc/ipsec.d'
$binary = '/usr/sbin/ipsec'
- class{'strongswan::centos::five':
+ class { 'strongswan::centos::five':
require => Class['monkeysphere'],
}
}
@@ -30,7 +30,7 @@ class strongswan(
$config_dir = '/etc/strongswan'
$cert_dir = '/etc/strongswan/ipsec.d'
$binary = '/usr/sbin/strongswan'
- class{'strongswan::centos::six':
+ class { 'strongswan::centos::six':
require => Class['monkeysphere'],
}
}
@@ -40,7 +40,7 @@ class strongswan(
$config_dir = '/etc/ipsec.d'
$cert_dir = '/etc/ipsec.d'
$binary = '/usr/sbin/ipsec'
- class{'strongswan::base':
+ class { 'strongswan::base':
require => Class['monkeysphere'],
}
}
@@ -48,7 +48,7 @@ class strongswan(
if $auto_remote_host and ($::strongswan_cert != 'false') and ($::strongswan_cert != '') {
# export myself
- @@strongswan::remote_host{$::fqdn:
+ @@strongswan::remote_host { $::fqdn:
right_cert_content => $::strongswan_cert,
right_ip_address => $strongswan::default_left_ip_address,
right_subnet => $strongswan::default_left_subnet,
@@ -60,7 +60,7 @@ class strongswan(
}
if $manage_shorewall {
- class{'shorewall::rules::ipsec':
+ class { 'shorewall::rules::ipsec':
source => $strongswan::shorewall_source
}
if $ipsec_nat {
diff --git a/manifests/remote_host.pp b/manifests/remote_host.pp
index f61b7fd..ca0c71d 100644
--- a/manifests/remote_host.pp
+++ b/manifests/remote_host.pp
@@ -10,7 +10,7 @@ define strongswan::remote_host(
$right_cert_name = $name,
$right_cert_content = 'absent'
){
- file{"${strongswan::config_dir}/hosts/${name}.conf":
+ file { "${strongswan::config_dir}/hosts/${name}.conf":
ensure => $ensure,
require => Package['strongswan'],
notify => Service['ipsec'],
@@ -26,7 +26,7 @@ define strongswan::remote_host(
}
if $right_cert_content != 'unmanaged' {
- strongswan::cert{$right_cert_name: }
+ strongswan::cert { $right_cert_name: }
if ($right_cert_content != 'absent') and ($ensure == 'present') {
Strongswan::Cert[$right_cert_name]{
ensure => $ensure,