主持人小组如何与领班合作? [英] How does host groups work with foreman?

查看:101
本文介绍了主持人小组如何与领班合作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何使用在线门户声明领班主持人组,但是您如何影响主持人呢?此外,与主机组有关的所有清单/模块都在哪里?并有一种特殊的格式吗?

I know how to declare foreman hostgroups using the online portal but how do you make it affect a host? Also where does all the manifests/module regarding the host group go? And is there a particular format to it?

感谢您的提前答复!

推荐答案

您需要在主机上设置主机组,方法是进入主机列表( Hosts> All hosts ),然后单击 Edit 主机旁边,然后从下拉列表中选择主机组,然后 Submit .您在主机组上设置的所有Puppet类都将应用于该主机.

You need to set the host group on the host, by going to the hosts list (Hosts > All hosts), click Edit next to the host and select the host group from the dropdown list, then Submit. Any Puppet classes you set on the host group will apply to that host.

您还可以通过使用左侧的复选框,从主机列表中的多个主机上设置主机组,然后从 Select Action 下拉菜单中选择 Change Group .右下角.

You can also set the host group on multiple hosts from the host list by using the tickboxes on the left, then choosing Change Group from the Select Action dropdown menu in the drop right.

您的Puppet模块进入主机所在环境的常规Puppet模块路径.如果您的主机位于生产"环境中,则通常为/etc/puppet/environments/production/modules/.通常在Puppet的basemodulepath中配置诸如/etc/puppet/modules/之类的路径,并且应将其应用于所有环境.

Your Puppet modules go into the regular Puppet modulepath for the environment that your host is in. If your host is in the "production" environment, then this would usually be /etc/puppet/environments/production/modules/. Paths such as /etc/puppet/modules/ are usually configured in Puppet's basemodulepath and should apply to all environments.

模块的布局需要符合木偶的自动加载机布局,它提供了可预测的结构,因此Puppet可以找到它们.如果要添加ntp类,则该类可能位于/etc/puppet/environments/production/modules/ntp/manifests/init.pp中.

The layout of modules needs to meet Puppet's autoloader layout, which gives a predictable structure so Puppet can find them. If you were adding an ntp class, it'd probably be in /etc/puppet/environments/production/modules/ntp/manifests/init.pp.

将模块放入文件系统后,可以将其导入 Configure> Puppet classes> Import 下.如果未显示,请使用puppet parser validate init.pp等检查语法.

Once you've put your module(s) on the filesystem then you can import them under Configure > Puppet classes > Import. If they don't show up, check the syntax with puppet parser validate init.pp etc.

这篇关于主持人小组如何与领班合作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆