Commit 91616661 authored by Lonlone Lee's avatar Lonlone Lee
Browse files

Update init.pp

parent c6687600
Loading
Loading
Loading
Loading
+22 −8
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
define patchman_client (
  Enum['present', 'absent'] $ensure = 'present',
  $wallet_client_netrc              = undef,
  Boolean $use_pepublic_wallet      = false,
)
{
  if ($wallet_client_netrc  == undef) {
@@ -43,6 +44,18 @@ define patchman_client (
  # login to the patchman service for uploads. We use $name as part of the
  # filename in case this define is called more than once.
  $netrc_path = "/etc/patchman/${patchman_server}.netrc"

  if ($use_pepublic_wallet) {
    wallet { $wallet_client_netrc:
      ensure  => $ensure,
      type    => 'file',
      path    => $netrc_path,
      owner   => 'root',
      group   => 'root',
      mode    => '0660',
      require => Class['Patchman_client::Install_package'],
    }
  } else {
    base::wallet { $wallet_client_netrc:
      ensure  => $ensure,
      type    => 'file',
@@ -52,6 +65,7 @@ define patchman_client (
      mode    => '0660',
      require => Class['Patchman_client::Install_package'],
    }
  }

  $patchman_conf_path = "/etc/patchman/${patchman_server}.conf"
  file { $patchman_conf_path: