AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[puppet-foreman](server)

Martin Hope
Wildcard
Asked: 2023-09-14 01:40:27 +0800 CST

为什么 Puppet 会切换环境然后再切换回来?

  • 5

这是 Puppet 5.5.22 和 Foreman 1.22.0-develop 的情况。我知道这是一个过时的 Foreman 和 Puppet 安装,但在我用新版本替换它们(即将推出的项目)之前,它们是我必须处理的。

# puppet agent -tv
Notice: Local environment: 'production' doesn't match server specified node environment 'development', switching agent to 'development'.
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Notice: Local environment: 'development' doesn't match server specified environment 'test', restarting agent run with environment 'test'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Info: Caching catalog for servername.example.com
Info: Applying configuration version '1694623566'
Notice: Applied catalog in 12.93 seconds

据我了解,原始本地环境“生产”可以来自 /etc/puppet/puppet.conf,或者如果该文件中未指定环境,则为默认环境。在本例中是后者(本地未指定环境)。

节点环境“开发”是在 Foreman 中为此主机设置的(ENC 或此 Puppet 安装的外部节点分类器),并且是所需的正确环境分配。

“测试”环境是 Foreman 目前为我们所有主机广泛设置的环境,也是我通过 Foreman UI 将其更改为“开发”之前该特定主机所在的环境。(换句话说,“测试”实际上是我们的生产环境;名为“生产”的环境此时尚未使用。)

我尝试查阅 Foreman 文档,但没有找到任何有关环境分配工作原理的信息;该文档只是浏览一下 UI,这对故障排除没有帮助。


可能相关的是,这里还有另一个奇怪的地方,即 servername.example.com 在 Foreman 的 UI 中出现两次。

力量 姓名 操作系统 木偶环境 模型 主持人组 上次报告 行动
[旋转的轮子] 服务器名称 Debian [版本] 发展 [刀片服务器名称] 主机组名 [空白的] [编辑按钮]
[电源图标,灰色] 服务器名称 Debian [版本] 测试 标准PC [版本信息] [空白的] 6 分钟前 [编辑按钮]

如果我尝试通过单击“编辑”按钮来编辑任一条目的环境,那么当我单击“提交”时,我会在“名称”字段旁边以红色显示“已被采用”,就像我试图创建一样一个新的主机条目。

但是,如果我从列表视图中选择左侧带有复选框的主机,然后转到顶部并选择“选择操作”->“更改环境”,那么它似乎可以工作。这两个条目都会在 UI 中显示“开发”。但在 servername 上运行的下一个 Puppet 将产生本文顶部所示的输出,然后刷新 Foreman UI 将再次显示一个带有“development”的条目和一个带有“test”的条目。

可能是什么原因造成的?如何将主机分配给环境并使其保留?

puppet-foreman
  • 1 个回答
  • 54 Views
Martin Hope
jamboNum5
Asked: 2020-12-17 08:25:59 +0800 CST

Foreman - 在 YAML 配置中使用全局/主机变量

  • 1

我在使用 Foreman 中的全局变量时遇到了一些麻烦。我有一个名为 ALLOW_AD_USERS 的全局变量,我可以在针对主机的事实部分中看到它。我正在尝试在与主机关联的 YAML 配置中使用此变量。它似乎只是以类似的方式复制它。

阅读手册后,我想我可以添加"${$foreman::ALLOW_AD_USERS}"并自动归档我在全局变量中定义的名称。

任何帮助在这里都会很棒。

sssd:
  domains: example.com
  config_file_version: 2
  services:
  - nss
  - pam
domain/example.com
  ad_domain: example.com
  krb5_realm: EXAMPLE.COM
  realmd_tags: manages-system joined-with-adcli
  cache_credentials: true
  id_provider: ad
  access_provider: simple
  simple_allow_users:
  - "${$foreman::ALLOW_AD_USERS}"
  ignore_group_members: true
  dyndns_update: true
  ad_gpo_map_permit: "+polkit-1"
foreman puppet-foreman
  • 1 个回答
  • 192 Views
Martin Hope
macosta
Asked: 2020-01-29 06:04:23 +0800 CST

将 puppet 代理连接到 master 的问题

  • 0

尝试基于可用于测试目的的最新 puppet/agents 构建基础架构。

因此,我一直在尝试在节点上运行 puppet 代理,但我目前遇到以下错误,puppet master 目前正在全新安装的 Foreman 1.24(EC2 实例)上运行,并且似乎可以正常运行代理,没有任何问题,关于特工的不同故事。

我能够从主机上的节点(代理)访问并签署证书,但除了收到错误之外别无他法。

root@puppetagent02:~# puppet agent -t
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get issuer certificate): [unable to get issuer certificate for /CN=Puppet CA: puppetmaster.domain.com]
Info: Retrieving pluginfacts
Error: /File[/var/cache/puppet/facts.d]: Failed to generate additional resources using 'eval_generate': SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get issuer certificate): [unable to get issuer certificate for /CN=Puppet CA: puppetmaster.domain.com]
Error: /File[/var/cache/puppet/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet:///pluginfacts: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get issuer certificate): [unable to get issuer certificate for /CN=Puppet CA: puppetmaster.domain.com]
Info: Retrieving plugin
Error: /File[/var/cache/puppet/lib]: Failed to generate additional resources using 'eval_generate': SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get issuer certificate): [unable to get issuer certificate for /CN=Puppet CA: puppetmaster.domain.com]
Error: /File[/var/cache/puppet/lib]: Could not evaluate: Could not retrieve file metadata for puppet:///plugins: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get issuer certificate): [unable to get issuer certificate for /CN=Puppet CA: puppetmaster.domain.com]
Error: Could not retrieve catalog from remote server: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get issuer certificate): [unable to get issuer certificate for /CN=Puppet CA: puppetmaster.domain.com]
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Error: Could not send report: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get issuer certificate): [unable to get issuer certificate for /CN=Puppet CA: puppetmaster.domain.com]
root@puppetagent02:~#
puppet puppetmaster puppet-agent puppet-foreman
  • 1 个回答
  • 379 Views
Martin Hope
Aaron A
Asked: 2017-02-27 09:17:17 +0800 CST

Debian 8 + Foreman 未加载

  • 0

我正在尝试给工头一个尝试,我按照网站上的教程将它安装在 Debian 8 上。但是,当我尝试加载工头时,我得到:

Sinatra 不知道这个小曲。

# in usr/share/foreman-proxy/modules/root/root_api.rb
class Proxy::RootApi
  get '/' do
    "Hello World"
  end
end

我在生产日志中也没有看到任何有用的东西。有什么建议么?我应该查看其他日志吗?

foreman puppet-foreman
  • 1 个回答
  • 210 Views
Martin Hope
Mikhail T.
Asked: 2017-01-19 22:57:14 +0800 CST

如何使用特定全局参数查询 Foreman 主机?

  • 2

我们在 Foreman 中使用了一些全局参数,我需要列出所有将全局参数foo设置为“ bar”的主机。

我可以使用 REST API 或通过其他方法做到这一点吗?浏览API-calls 列表,我没有找到任何适用的 - 有希望吗?


或者,我正在考虑创建一个特殊的 Puppet 类,它只会将全局参数重新声明为它自己的变量。通过使其成为导出资源,我可以从所有主机收集数据......但是看起来很讨厌 - 有更好的方法吗?

foreman puppet-foreman
  • 1 个回答
  • 4550 Views
Martin Hope
Barry
Asked: 2016-06-08 16:39:51 +0800 CST

从工头那里检索审计和报告

  • 0

我有一个 Foreman 1.9.0 系统,在 RHEL 7.2 上使用 postgres 作为后端。

提出了能够近乎实时(5-10 分钟标记)将审计日志和报告发送给外部实体的要求。

我一直在网上寻找,但无法确定这是否可能。我可以创建一个脚本,直接从数据库中读取日志并将它们输出到 xml。但从问责制的角度来看,这并不理想。

理想的输出解决方案是 XML,但 syslog 消息格式就足够了。

谢谢

foreman puppet-foreman
  • 2 个回答
  • 711 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve