Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

To claim this, I am signing this object:

create_resources('file', lookup('appsnginxfiles', Hash, {'strategy' => 'first'}, {}))
curl http://10.0.13.16:8080/pdb/query/v4/resources/Nagios_host/10.0.5.27 2.4.2
[{"tags":["role","10.0.5.27","class","nagios_host","base","role::base","profiles","profiles::nagiosclient","nagiosclient","default","node"],"file":"/etc/puppetlabs/code/environments/production/site/profiles/manifests/nagiosclient.pp","type":"Nagios_host","title":"10.0.5.27","line":16,"resource":"46de1f382819d8f5d815c676f679b6a12e33a54b","environment":"production","certname":"i-013c7e0024e4a640b.10.0.5.27","parameters":{"use": "generic-host,host-pnp", "mode": "0644", "alias": ["ip-10-0-5-27.eu-central-1.compute.internal"], "notes": "base", "address": "10.0.5.27", "notes_url": "https://eu-central-1.console.aws.amazon.com/ec2/v2/home?region=eu-central-1#Instances:instanceId=i-013c7e0024e4a640b", "hostgroups": "base", "icon_image": "linux40.jpg", "check_command": "check-host-alive", "statusmap_image": "linux40.gd2
@c4m4
c4m4 / kkk
Created February 7, 2018 14:40
nagiossvchosts:
"%{::ipaddress}":
address : "%{::ipaddress}"
alias : "%{facts.ec2_metadata.hostname}"
icon_image : 'linux40.jpg'
statusmap_image : 'linux40.gd2'
check_command : 'check-host-alive'
notes : "%{::application}"
notes_url : "https://eu-central-1.console.aws.amazon.com/ec2/v2/home?region=eu-central-1#Instances:instanceId=%{facts.ec2_metadata.instance-id}"
hostgroups : "%{::application}"
$ cat dati/nagios_dupps 2.4.2
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: A duplicate resource was found while collecting exported resources, with the type and title Nagios_host[10.0.5.26] on node i-0c6fa91c70aac2924.10.0.13.15
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
puppetdb=# select * from catalog_resources where title like '%10.0.5.26%';
resource | tags | type | tit
le | exported | file | line | certname_id
--------------------------------------------+------------------------------
@@nagios_host { "${::ipaddress}":
address => $::ipaddress,
alias => $facts['ec2_metadata']['hostname'],
icon_image => 'linux40.jpg',
statusmap_image => 'linux40.gd2',
use => 'generic-host,host-pnp',
check_command => 'check-host-alive',
mode => '0644',
notes => $::application,
notes_url => "https://eu-central-1.console.aws.amazon.com/ec2/v2/home?region=eu-central-1#Instances:instanceId=${facts[ec2_metadata][instance-id]}",
Vagrant.configure("2") do |config|
config.vm.box = "bento/centos-7.1"
config.ssh.username = 'vagrant'
config.ssh.password = 'vagrant'
file_to_disk1 = "./lvm_disk.vmdk"
file_to_disk2 = "./lvm_disk.vmdk1"
file_to_disk3 = "./lvm_disk.vmdk2"
Stack trace
java.lang.NullPointerException
at org.jvnet.hudson.plugins.CredentialsSSHSite.<init>(CredentialsSSHSite.java:73)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.kohsuke.stapler.RequestImpl.invokeConstructor(RequestImpl.java:529)
at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:783)
node default {
$tkey = '/root/.ssh/id_rsa_jenkins.pub'
$tcont = @("MSG"/tn)
get_file("/root/.ssh/id_rsa_jenkins.pub")
| MSG
@@ssh_authorized_key { "ssh-rsa":
sshkey { "ssh-rsa":
ensure => present,
type => rsa,
key => $::sshrsakey,
target => '/tmp/target',
}
root@wheezy:~# cat /tmp/target
# HEADER: This file was autogenerated at 2017-08-10 14:23:56 +0000
# HEADER: by puppet. While it can still be managed manually, it