Hi All,
I'm new to Puppet and I need your help please.
--> I'm re-configuring puppet in manuscript but testing agent fails with dependency error:
root@agent:~# puppet agent --test --noop --debug --verbose<...>
debug: Creating default schedules
err: Failed to apply catalog: Could not find dependency File[/plugins.d] for File[/plugins.d/irq.conf] at /etc/puppet/modules/collectd/manifests/plugins/irq.pp:8
root@agent:~#
--> The file is there on the puppet master:
root@master:~# ls -l /etc/collectd/plugins.d/irq.conf
-rw-r----- 1 root root 15 Jan 21 2015 /etc/collectd/plugins.d/irq.conf
root@master:~#
--> I tried replacing file location variable with hard-coded path but the agent test still complaining about it.
Thanks in Advance!
Thanks,
George Gabra
↧
Puppet Agent reports "Failed to apply catalog: Could not find dependency File"
↧
Puppet Agent reports "Failed to apply catalog: Could not find dependency File"
Hi All,
I'm new to Puppet and I need your help please.
--> I'm re-configuring puppet in manuscript but testing agent fails with dependency error:
root@agent:~# puppet agent --test --noop --debug --verbose<...>
debug: Creating default schedules
err: Failed to apply catalog: Could not find dependency File[/plugins.d] for File[/plugins.d/irq.conf] at /etc/puppet/modules/collectd/manifests/plugins/irq.pp:8
root@agent:~#
--> The file is there on the puppet master:
root@master:~# ls -l /etc/collectd/plugins.d/irq.conf
-rw-r----- 1 root root 15 Jan 21 2015 /etc/collectd/plugins.d/irq.conf
root@master:~#
--> I tried replacing file location variable with hard-coded path but the agent test still complaining about it.
Thanks in Advance!
Thanks,
George Gabra
↧
↧
Puppet list files of certain type
Hi!
I would like to know if it is possible to perform a file search using puppet which collects all the files of a certain type. I have seen an interesting puppet attribute named **tidy** [More info here](https://puppet.com/docs/puppet/6.0/type.html#tidy) which is used to remove all files of a certain type. I would like to be able to just collect the names of those files (not delete them). I know that I can create my own puppet fact with python code to do that, but efficiency is also important. Is it possible to use tidy just for collecting (and avoid deleting) or a similar puppet attribute to do this?
Thanks!
↧
Puppet list files of certain type
Hi!
I would like to know if it is possible to perform a file search using puppet which collects all the files of a certain type. I have seen an interesting puppet attribute named **tidy** [More info here](https://puppet.com/docs/puppet/6.0/type.html#tidy) which is used to remove all files of a certain type. I would like to be able to just collect the names of those files (not delete them). I know that I can create my own puppet fact with python code to do that, but efficiency is also important. Is it possible to use tidy just for collecting (and avoid deleting) or a similar puppet attribute to do this?
Thanks!
↧
How can I pass multiple stings to file using augeas
I need to add the following line to a file using augeas:
-u ntp:ntp -p
argues is reading only first string.
↧
↧
Hiera Deep Merge inside create_resources
Hello, I'm trying to do a merge inside create_resources class but the hash is not being merged correctly, I think the guilty is the hash name for each instance to be configured.
**Hiera Global Config**
version: 5
hierarchy:
- name: "Common Merge Policy"
path: "C:/ProgramData/PuppetLabs/code/environments/hieradata/merge_policy.yaml"
- name: "Node specific configuration"
path: "C:/ProgramData/PuppetLabs/code/environments/hieradata/%{trusted.certname}.yaml"
- name: "AppServer specific configuration"
path: "C:/ProgramData/PuppetLabs/code/environments/%{environment}/hieradata/config.yaml"
**Merge Policy**
lookup_options:
"^config::config_sites::(.*)::siteparams$":
merge:
strategy: deep
**Common config**
config::config_sites:
siteparams:
controller: 8000
dispatcher: 8102
**Node Specific config**
config::config_sites:
INSTANCE1:
siteparams:
controller: 4000
**Crete_Resources called class**
define m4appconfig::config_sites (
$siteparams = {},
$servers = {}
){
The problem is that the retrieved hash is the defined in Node Specific YAML and it's not merged with the Common one in order to populate the whole hash with the default value for the dispatcher key.
I think this could happen because in the node specific YAML i'm specifying a list of instance to configure and inside each instance in the hash I hold all the customized config for each one.
I'm doing this in the correct way? Or should I change my approach?.
Thank you.
↧
How to disable the log warning messages in puppet 4.6.2
Hi all,
Using the puppet version 4.6.2
In the environment for the linux and windows nodes getting the below mentioned puppet log warnings.
Warning: ModuleLoader: module 'ntp' has unresolved dependencies - it will only see those that are resolved. Use 'puppet module list --tree' to see information about modules
(file & line not available)
Warning: ModuleLoader: module 'nfs' has unresolved dependencies - it will only see those that are resolved. Use 'puppet module list --tree' to see information about modules
(file & line not available)
Warning: ModuleLoader: module 'consul' has unresolved dependencies - it will only see those that are resolved. Use 'puppet module list --tree' to see information about modules
(file & line not available)
Note: When executing the puppet module list --tree command it is nothing in the output.
[root@xxxxxxxxx ~]# puppet --version
4.6.2
[root@xxxxxxxxx ~]# puppet module list
[root@xxxxxxxxx ~]# puppet module list --tree --verbose
[root@xxxxxxxxx~]#
Request please help me on this issue, how to resolve.
↧
puppet enterprise installation failing on RHEL 7.5
Hi,
I am trying to install puppet enterprise 2016.1.2 on RHEL 7.5 through web console, but it is constantly failing with below error while
Install Puppet Enterprise Failed to run PE installer
Uploading Enabled Repositories Report
Uploading Enabled Repositories Report
Loaded plugins: langpacks, product-id, subscription-manager
Loaded plugins: langpacks, product-id, subscription-manager
** yum clean all --disablerepo='*' --enablerepo=puppet-enterprise-installer
Loaded plugins: enabled_repos_upload, langpacks, package_upload, product-id,
: search-disabled-repos, subscription-manager
Loaded plugins: enabled_repos_upload, langpacks, package_upload, product-id,
: search-disabled-repos, subscription-manager
Cleaning repos: puppet-enterprise-installer
Cleaning repos: puppet-enterprise-installer
Cleaning up everything
Cleaning up everything
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
Maybe you want: rm -rf /var/cache/yum, to also free up space taken by orphaned data from disabled or removed repos
Uploading Enabled Repositories Report
Uploading Enabled Repositories Report
Loaded plugins: langpacks, product-id, subscription-manager
Loaded plugins: langpacks, product-id, subscription-manager
** rm -f /etc/yum.repos.d/puppet-enterprise-installer.repo
** mkdir -p '/opt/puppetlabs/puppet/share/installer/installer'
** cp -pR '/puppet/puppet-enterprise-2016.1.2-el-7-x86_64'/* '/opt/puppetlabs/puppet/share/installer/installer'
** RACK_ENV=production /opt/puppetlabs/puppet/bin/bundle exec thin start --debug -p 3000 -a 0.0.0.0 --ssl --ssl-disable-verify
Using rack adapter
Thin web server (v1.6.3 codename Protein Powder)
Debugging ON
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop
cp -rp /opt/puppetlabs/puppet/share/installer/installer /tmp/pe-installer-kfXtC4GH/install
cp -rp /tmp/installer-content20181005-3186-181ybz1 /tmp/pe-installer-kfXtC4GH/bl4ul252.ad.infosys.com.answers
The same is installed fine on RHEL 7.2 VM's, is there a issue with RHEL 7.5 version? Please help.
↧
Has Puppet Dashboard been deprecated?
I have this repo synced: https://yum.puppetlabs.com/el/6Server/products/x86_64 in my Red Hat Satellite.
At the time of syncing probably about 6 months ago the puppet-dashboard package was available and synced.
I am trying to build a new Puppet Master as we are upgrading from 3.4.2 to 3.8.
I need puppet-dashboard but I finding that I am having a package install failure when yum tries to install puppet-dashboard.
Yum can see the package but then fails to install it.
I check on the Satellite and I can 'see' the packages in the UI. But when I check the online repo:
https://yum.puppetlabs.com/el/6Server/products/x86_64
I can no longer see a puppet-dashboard. Explain why yum cant install it. There is nothing for the Satellite to grab.
Has puppet-dashboard been removed?
Where can I get it from?
Any ideas?
Thanks
↧
↧
beaker step by step guide
Does anyone have a step by step documentation on beaker for testing?
Like for a new Puppet user?
↧
add character to first and last array elements in ruby
Hello
I'm trying to format the output of a custom fact in ruby.
I've got this array:
array = [ "a", "b", "c", "d", "e", "f", "g", "h" ]
what i'd like to do is add a character to the first and last elements, so i end up with:
[ "na", "b", "c", "d", "e", "f", "g", "hn" ]
I've tried all sorts of ways using an if array.first? or array.last? conditions in a map! statement but just can't seem to get there.
Any help appreciated!
Cheers
↧
Chown Recursively excluding a directory.
Murugan Ramaswamy
9:04 AM (0 minutes ago)
to me
My requirement is to run chown command recursively for a path except for one directory in that path.
For example:
Path:/opt/test/
Except for path:/opt/test/new/exclude/
How can I achieve this in puppet:
I can do this with Linux command like the below one:
"find /opt/test/ -not -path "*/exclude/*" -exec chown user1:group1 { } \;"
But I'm not able to use the option -not -path in puppet , Can someone help me on how to achieve this scenario in puppet.
↧
Help extracting full hash (with title) from a hash of hashes.
I have a YAML that looks like this:
Cluster_list:
server1.domain.com:
port: 1234
ssl_port: 0987
server2:domain.com:
port: 1234
ssl_port: 0987
server3.domain.com:
port: 1234
ssl_port: 0987
The lookup would give a hash like this into the variable:
{server1.domain.com => {port => 1234, ssl_port => 0987}, server2:domain.com => {port => 1234, ssl_port => 0987}, server3.domain.com => {port => 1234, ssl_port => 0987}}
I can then grab one of the internal hashes using a subscript of ['server2.domain.com']... this returns the children of server2.domain.com. How can I also get the title for this hash into the variable?
What I want to do is basicially:
$this_server = $lookup_var[$facts[fqdn]]
and end up with $this_server having the full hash: `server2:domain.com => {port => 1234, ssl_port => 0987}`
↧
↧
Puppet Agent reports "Could not retrieve catalog from remote server: Error 400 on SERVER: Moduleis not compatible with windows"
Hi All,
I'm working on re-configuring Puppet on already configured environment but Puppet agents on windows machines are failing with error "Could not retrieve catalog from remote server: Error 400 on SERVER: Moduleis not compatible with windows"
Running Puppet agent on demand ...
info: Retrieving plugin
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/active_install_facts.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/artifact_facts.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/concat_basedir.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/config_facts.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/facter_dot_d.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/fogbugz_generation_facts.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/keepalived_version.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/osreleasemaj.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/pe_version.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/puppet_vardir.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/pygpgme.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/root_home.rb
info: Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/service_facts.rb
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Moduleis not compatible with windows at /etc/puppet/modules/python/manifests/init.pp:44 on node .
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
Press any key to continue . . .
On Puppet Master there is "Module compatibility check" on "/etc/puppet/modules/python/manifests/init.pp" file which check OS family
grep -v "^#" /etc/puppet/modules/python/manifests/init.pp
class python (
$version = 'system',
$pip = true,
$dev = true,
$virtualenv = true
) {
# Module compatibility check
$compatible = [ 'Debian', 'Ubuntu', 'CentOS', 'RedHat' ]
if ! ($::operatingsystem in $compatible) {
fail("Module is not compatible with ${::operatingsystem}")
}
Class['python::install'] -> Class['python::config']
include python::install
include python::config
}
Is there a way to make nodes running Windows OS skip checking that module?
Thanks,
George Gabra
↧
How do I create an acceptance test for a custom function ?
I am trying to help out on The Forge, and the folks running the pull requests/merges are asking for an acceptance test.
https://github.com/voxpupuli/puppet-yum/pull/123
↧
When i Run puppet agent -t i come across this error. I am not sure why. I did not have this issue before.
Error: '/usr/bin/printf ' pluginsync = true
' >> /etc/puppet/puppet.conf' returned 1 instead of one of [0]
Error: /Stage[main]/Puppet_agent/Exec[puppetSync]/returns: change from 'notrun' to ['0'] failed: '/usr/bin/printf ' pluginsync = true
' >> /etc/puppet/puppet.conf' returned 1 instead of one of [0]
↧
Is there a clear document outlining the backward compatibility of Puppet Enterprise and Puppet Agents?
I'm having trouble finding in the documentation a CLEAR explanation of the backward compatibility statement of Puppet Enterprise and Puppet Agents.
For example if an admin were running an Agent based on Puppet 5.5.6 and he had hosts running with older agents, like 5.3.5 or 4.5.2, is this supported?
I see vague statements that the Server must be at a version "newer" than the agents being managed, but they don't state clearly the limitations on this backward compatibility.
↧
↧
puppetlabs/acl uninitialized constant Puppet::Util::Windows::String
Hi,
When I run one rspec test that uses the module puppetlabs/acl on a RHEL6 server I get the following error:
```
error during compilation: Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/acl: Could not autoload puppet/provider/acl/windows: uninitialized constant Puppet::Util::Windows::String
```
I understand that the acl module is specific for windows, but I would expect that the rspec tests would work in any operating system. I runned the puppet code on a windows 2012 R2 machine and it worked perfectly with the acl.
Any idea on how I can solve this issue? Thanks for any help.
↧
How can I create an environment file by copying an existing udm.Environment file and rename it using Puppet for XL Deploy
I am able to create new dictionaries and environment files in XL Deploy UI using puppet with below code:
deployit_environment { "Environment/project/env/dev/$env-env":
ensure => present,
server => Deployit['remote'],
containers => $Containers,
dictionaries => $Dictionaries
}
I am looking for a way to create udm.envionment file by copying the existing environment file and change the name and details as per need.
↧
How can I create an environment file by copying an existing udm.Environment file in XL Deploy UI and rename it using Puppet
I am able to create new dictionaries and environment files in XL Deploy UI using puppet with below code:
deployit_environment { "Environment/project/env/dev/$env-env":
ensure => present,
server => Deployit['remote'],
containers => $Containers,
dictionaries => $Dictionaries
}
I am looking for a way to create udm.envionment file by copying the existing environment file and change the name and details as per need.
Is there any way to achieve this? Thanks in advance.
↧