Skip to content

Instantly share code, notes, and snippets.

curl -XPUT 'http://localhost:9200/_template/template_logstash/' -d '
{
"template": "logstash-*",
"settings": {
"index": {
"query": {
"default_field": "message"
},
"store": {
"compress": {
# WARNING! This file is maintained by Puppet, do not modify directly!
input {
file {
type => "syslog"
path => ["/var/log/secure", "/var/log/messages"]
tags => ["syslog"]
}
pipe {
type => "edgecast-logs"
[root@puppet nodes]# puppet module --modulepath '/etc/puppet/environments/production/modules' upgrade --ignore-dependencies puppetlabs/mysql
Notice: Preparing to upgrade 'puppetlabs-mysql' ...
Notice: Found 'puppetlabs-mysql' (v2.2.0) in /etc/puppet/environments/production/modules ...
Error: Could not upgrade module 'puppetlabs-mysql' (v2.2.0 -> latest)
Installed module has had changes made locally
Use `puppet module upgrade --force` to upgrade this module anyway
[root@puppet nodes]# puppet --version
3.3.2
[root@puppet nodes]# puppet module --modulepath '/etc/puppet/environments/production/modules' upgrade --ignore-dependencies puppetlabs/firewall
Notice: Preparing to upgrade 'puppetlabs-firewall' ...
[root@dmzforeman foreman]# RAILS_ENV=production rake db:seed
rake aborted!
Please install the mysql adapter: `gem install activerecord-mysql-adapter` (mysql is not part of the bundle. Add it to Gemfile.)
Started POST "/api/reports" for 10.168.80.23 at 2014-03-11 12:10:39 -0500
Processing by Api::V2::ReportsController#create as JSON
Parameters: {"report"=>"[FILTERED]", "apiv"=>"v2"}
undefined method `chefproxy_proxies' for #<Class:0x0000000791e680> (NoMethodError)
/opt/foreman/vendor/ruby/2.0.0/gems/activerecord-3.2.17/lib/active_record/dynamic_matchers.rb:55:in `method_missing'
/opt/foreman/app/controllers/concerns/foreman/controller/smart_proxy_auth.rb:22:in `require_puppetmaster_or_login'
/opt/foreman/vendor/ruby/2.0.0/gems/activesupport-3.2.17/lib/active_support/callbacks.rb:454:in `block (3 levels) in _run__3203979630335087770__process_action__213082515809476178__callbacks'
/opt/foreman/vendor/ruby/2.0.0/gems/activesupport-3.2.17/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_5365'
/opt/foreman/vendor/ruby/2.0.0/gems/activesupport-3.2.17/lib/active_support/callbacks.rb:326:in `around'
/opt/foreman/vendor/ruby/2.0.0/gems/activesupport-3.2.17/lib/active_support/callbacks.rb:
[root@dmzpuppet kiops]# r10k deploy environment -p --verbose DEBUG
Faraday: you may want to install system_timer for reliable timeouts
[R10K::Task::Deployment::DeployEnvironments - INFO] Loading environments from all sources
[R10K::TaskRunner - ERROR] Task #<R10K::Task::Deployment::DeployEnvironments:0x7fbe055b94e0> failed while running: Couldn't update git cache for kiops@localhost:/var/local/dmzpuppet.git: "fatal: The remote end hung up unexpectedly"
[R10K::Task::Deployment::PurgeEnvironments - INFO] Purging stale environments from /etc/puppet/environments
[root@dmzpuppet kiops]# ls /etc/puppet/environments
production
[root@dmzpuppet kiops]#
foxx@slave04:~/puppet$ cat ~/.ssh/config
Host github.com
User frozenfoxx
HostName github.com
PreferredAuthentications publickey
IdentityFile /home/foxx/.ssh/id_frozenfoxx_github
Host repo.mycompany.local
User git
HostName repo.mycompany.local
PreferredAuthentications publickey
### Keybase proof
I hereby claim:
* I am frozenfoxx on github.
* I am foxx (https://keybase.io/foxx) on keybase.
* I have a public key whose fingerprint is 82ED C38D 2258 58C9 26B1 DF84 1BEF 361E 3D4E 98E9
To claim this, I am signing this object:
Main Node:
### MANAGED BY PUPPET ###
---
cluster:
name: logstash
discovery:
zen:
node:
master: true
@frozenfoxx
frozenfoxx / Vagrantfile-puppet-ubuntu-multi
Last active October 15, 2019 23:32 — forked from Sharpie/Vagrantfile
A simple Vagrantfile for spinning up a master-agent pair.
Vagrant.require_version ">= 1.5.0"
require 'vagrant-hosts'
require 'vagrant-auto_network'
Vagrant.configure('2') do |config|
config.vm.define :puppetmaster do |node|
# An index of pre-built boxes can be found at:
#
# https://vagrantcloud.com/puppetlabs