puppet

How to use setm in puppet

邮差的信 提交于 2019-12-02 02:18:04
问题 I would like to change a one property name ( " modcluster.proxylist " ) with setm Command in Puppet. My following code is not working. Any help is much appreciated. augeas { "jboss_domain_config": incl => "/opt/domain.xml", lens => "Xml.lns", context => "/files/opt/domain.xml", onlyif => "match /files/opt/domain.xml/domain/server-groups/*/system-properties/*/#attribute/name modcluster.proxylist" changes => "setm /files/opt/domain.xml/domain/server-groups server-group[.]/system-properties

Using puppet module straight from a cloned repo

泪湿孤枕 提交于 2019-12-02 02:04:17
I'm trying to use puppet module in a vagrant setup. In a worked around the problem I tried to solve in this stackoverflow question . I cloned the puppet module repo (apt module and nodejs module) into a sub folder set the puppet module path in the vagrantfile And include the puppet modules and call them in the puppet manifest file for example: class { 'apt': } include apt class{ 'apt':} -> apt::builddep { ["python-imaging","python-lxml"]: require => Class['apt'] } I wonder, maybe there is an install/build step I'm missing when I just git clone the repo? is this even possible to do? The error

Using puppet module straight from a cloned repo

ⅰ亾dé卋堺 提交于 2019-12-02 01:45:32
问题 I'm trying to use puppet module in a vagrant setup. In a worked around the problem I tried to solve in this stackoverflow question. I cloned the puppet module repo (apt module and nodejs module) into a sub folder set the puppet module path in the vagrantfile And include the puppet modules and call them in the puppet manifest file for example: class { 'apt': } include apt class{ 'apt':} -> apt::builddep { ["python-imaging","python-lxml"]: require => Class['apt'] } I wonder, maybe there is an

Windows Puppet agent does not connect to the AWSOpsWorks Puppet Enterprise master

佐手、 提交于 2019-12-02 00:31:46
I have created the puppet master using aws opsworks. and I am able to add ami linux nodes automatically to the puppet master. I am having issues when I tried to to add a windows 64 bit node to my puppet master by following this link https://puppet.com/docs/pe/2017.3/installing/installing_agents.html#install-windows-agents-with-the-msi-package I copied the puppet-agent-x64.msi from the puppet master present in location to the windows node and /opt/puppetlabs/server/data/packages/public//windows-x86_64-/ and ran the installer to install the agent. the installation is successful and the Start

SaltStack;以及与AnsibleWorks,Chef-solo,puppet等等等的比较!

喜夏-厌秋 提交于 2019-12-01 23:23:38
SaltStack;以及与AnsibleWorks,Chef-solo,puppet等等等的比较! ...        http://www.vpsee.com/2013/08/a-system-configuration-management-and-orchestration-tool-saltstack/ 系统自动化配置和管理工具 SaltStack 2013年08月22日 | 标签: devops , puppet , salt , saltstack | 作者: vpsee 我们的服务器 由 Puppet 配置管理工具来管理 ,服务器上线后由 puppet 完成初始化和配置等一系列工作(比如,静态 IP 配置,DNS 设置,NFS/SAN 挂载,LDAP/Kerberos 登录,安全加固配置,内核参数优化,防火墙规则配置等等),等初始化完成后开始运行,运行一段时间后有一些需要自动和手动操作的任务(比如升级、重启、备份等),这时候我们 使用 Fabric 来批量执行 这些临时任务。 所以从这里可以看到 Puppet 和 Fabric 其实是两个不同性质的工具,看下面的归类可能会更清楚一些。Puppet 和 Fabric 两个的工作其实可以由一个工具 SaltStack(或 AnsibleWorks)完成,减少一个工具的使用会减轻一点负担(学习工具的人力成本

Using puppet hash for epp templates

拜拜、爱过 提交于 2019-12-01 11:59:20
问题 I have next code in erb template: <% if @proxy_cache_path.is_a?(Hash) -%> <% @proxy_cache_path.sort_by{|k,v| k}.each do |key,value| -%> proxy_cache_path <%= key %> keys_zone=<%= value %> levels=<%= @proxy_cache_levels %> max_size=<%= @proxy_cache_max_size %> inactive=<%= @proxy_cache_inactive -%> <% end -%> How to porting it for epp template? Im find very low information for it. Please help. 回答1: Here's how you can do that: Showing an example class and how to declare both an ERB and EPP

Using puppet hash for epp templates

天涯浪子 提交于 2019-12-01 11:48:15
I have next code in erb template: <% if @proxy_cache_path.is_a?(Hash) -%> <% @proxy_cache_path.sort_by{|k,v| k}.each do |key,value| -%> proxy_cache_path <%= key %> keys_zone=<%= value %> levels=<%= @proxy_cache_levels %> max_size=<%= @proxy_cache_max_size %> inactive=<%= @proxy_cache_inactive -%> <% end -%> How to porting it for epp template? Im find very low information for it. Please help. Here's how you can do that: Showing an example class and how to declare both an ERB and EPP template for comparison: # manifests/init.pp class foo () { $proxy_cache_path = { 'apples' => 1, 'bananas' => 2,

Issues adding attribute to XML root node via augeas

荒凉一梦 提交于 2019-12-01 11:11:54
I am using augeas to manipulate XML on some machines. Whereas creating new nodes and also setting a bunch of attributes worked like a charm I'm biting my nails of adding a simple attribute to an XML file. XML looks like the following: <?xml version="1.0"?> <Context> <WatchedResource></WatchedResource> </Context> I'm no just trying to add allowLinking="true" to the Context root node via set /files/path/to/my/file.xml/Context/#attribute/allowLinking "true" Which is unfortunately always failing with /error = "put_failed" /error/path = "/files/path/to/my/file.xml/Context" /error/lens = "/usr/share

How does puppet send commands to the OS?

北慕城南 提交于 2019-12-01 10:08:41
问题 I am new to Puppet, but understand the concepts quite well. Puppet Manifests call Puppet Modules and the Modules perform the actual task. I am trying to understand what happens at the Puppet Module layer. How does the command actually execute? Taking the example of the following, what commands are actually passed on to the operating system? Also, where is that defined? package { 'ntp': ensure => installed, } 回答1: Summary: Puppet determines the commands that need to be run, based on the facts

Exec onlyif registry value is not present

落花浮王杯 提交于 2019-12-01 07:32:38
* *EDIT ** I found a solution by playing around: class add_route { exec { "route_to_internal_network": command => "C:\Windows\System32\ROUTE.EXE add 192.168.5.254 mask 255.255.255.255 10.5.5.5 -p", unless => "C:\Windows\System32\reg.exe query HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\PersistentRoutes /f 192.168.5.254,255.255.252.0,10.5.5.5,1", } } I'll leave this post up in case anyone else is running into a similar problem * *EDIT ** I am trying to write a puppet manifest to add a persistent static route to some of my Windows host servers. So far, I am thinking of creating a