Skip to content

Commit

Permalink
fix #272 fix arrow on right operand line lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lbetz committed Apr 3, 2017
1 parent f9165ba commit 5d2b4d3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 20 deletions.
25 changes: 16 additions & 9 deletions manifests/feature/api.pp
Original file line number Diff line number Diff line change
Expand Up @@ -311,26 +311,33 @@
command => "icinga2 pki new-cert --cn '${::fqdn}' --key '${_ssl_key_path}' --cert '${_ssl_cert_path}'",
creates => $_ssl_key_path,
notify => Class['::icinga2::service'],
} ->
file {
}

-> file {
$_ssl_key_path:
mode => '0600';
$_ssl_cert_path:
} ->
}

exec { 'icinga2 pki get trusted-cert':
-> exec { 'icinga2 pki get trusted-cert':
command => "icinga2 pki save-cert --host '${ca_host}' --port ${ca_port} --key '${_ssl_key_path}' --cert '${_ssl_cert_path}' --trustedcert '${trusted_cert}'",
creates => $trusted_cert,
notify => Class['::icinga2::service'],
} ->
file { $trusted_cert: } ->
}

exec { 'icinga2 pki request':
-> file { $trusted_cert:
ensure => file,
}

-> exec { 'icinga2 pki request':
command => "icinga2 pki request --host '${ca_host}' --port ${ca_port} --ca '${_ssl_cacert_path}' --key '${_ssl_key_path}' --cert '${_ssl_cert_path}' --trustedcert '${trusted_cert}' --ticket '${ticket_id}'",
creates => $_ssl_cacert_path,
notify => Class['::icinga2::service'],
} ->
file { $_ssl_cacert_path: }
}

-> file { $_ssl_cacert_path:
ensure => file,
}
} # icinga2

'ca': {
Expand Down
26 changes: 15 additions & 11 deletions manifests/pki/ca.pp
Original file line number Diff line number Diff line change
Expand Up @@ -151,28 +151,32 @@
}

file { $_ssl_cacert_path:
ensure => file,
source => "${ca_dir}/ca.crt",
}

exec { 'icinga2 pki create certificate signing request':
command => "icinga2 pki new-cert --cn '${::fqdn}' --key '${_ssl_key_path}' --csr '${_ssl_csr_path}'",
creates => $_ssl_key_path,
require => File[$_ssl_cacert_path]
} ->
file {
$_ssl_key_path:
mode => '0600';
}
}

-> file { $_ssl_key_path:
ensure => file,
mode => '0600',
}

exec { 'icinga2 pki sign certificate':
command => "icinga2 pki sign-csr --csr '${_ssl_csr_path}' --cert '${_ssl_cert_path}'",
subscribe => Exec['icinga2 pki create certificate signing request'],
refreshonly => true,
notify => Class['::icinga2::service'],
} ->
file {
$_ssl_cert_path:;
$_ssl_csr_path:
ensure => absent;
}
}

-> file {
$_ssl_cert_path:
ensure => file;
$_ssl_csr_path:
ensure => absent;
}
}

0 comments on commit 5d2b4d3

Please sign in to comment.