麻烦使用Puppet Forge模块example42 / splunk

时间:2014-11-26 19:56:05

标签: puppet splunk

我想使用https://forge.puppetlabs.com/example42/splunk在我的某些系统上设置splunk。

所以在我的木偶大师身上我做了puppet module install example42-splunk

我使用PE控制台,因此我将类splunk和关联的splunk添加到了一个包含我的一个节点my-mongo-1的组。

我登录my-mongo-1并执行...

    [root@my-mongo-1 ~]# puppet agent -t
    ...
    Info: Caching catalog for my-mongo-1
    Info: Applying configuration version '1417030622'
    Notice: /Stage[main]/Splunk/Package[splunk]/ensure: created
    Notice: /Stage[main]/Splunk/Exec[splunk_create_service]/returns: executed successfully
    Notice: /Stage[main]/Splunk/File[splunk_change_admin_password]/ensure: created
    Info: /Stage[main]/Splunk/File[splunk_change_admin_password]: Scheduling refresh of Exec[splunk_change_admin_password]
    Notice: /Stage[main]/Splunk/Service[splunk]/ensure: ensure changed 'stopped' to 'running'
    Info: /Stage[main]/Splunk/Service[splunk]: Unscheduling refresh on Service[splunk]
    Notice: /Stage[main]/Splunk/Exec[splunk_change_admin_password]/returns: Could not look up HOME variable.  Auth tokens cannot be cached.
    Notice: /Stage[main]/Splunk/Exec[splunk_change_admin_password]/returns:
    Notice: /Stage[main]/Splunk/Exec[splunk_change_admin_password]/returns:  In handler 'users': The password cannot be set to the default password.
    Error: /Stage[main]/Splunk/Exec[splunk_change_admin_password]: Failed to call refresh: /opt/splunkforwarder/bin/puppet_change_admin_password returned 22 instead of one of [0]
    Error: /Stage[main]/Splunk/Exec[splunk_change_admin_password]: /opt/splunkforwarder/bin/puppet_change_admin_password returned 22 instead of one of [0]
    Notice: Finished catalog run in 11.03 seconds

那我在这里做错了什么?

为什么我会收到Could not look up HOME variable. Auth tokens cannot be cached.错误?

1 个答案:

答案 0 :(得分:2)

我看到你在Ask Puppet上问了这个问题,并在Vagrant中进行了快速测试,并且有两个解决方案:

1)在Puppet中为Splunk提供不同的密码(因为它抱怨使用默认密码)

class { "splunk":
  install => "server",
  admin_password => 'n3wP4assw0rd',
}

2)将模块升级到没有此问题的较新版本:

puppet module upgrade example42-splunk --force