Skip to content

Instantly share code, notes, and snippets.

Warning: /Stage[main]/Profile_jenk::Jenkjobs/Jenkins::Job[Update a Prod Security Group]/Jenkins::Job::Present[Update a Prod Security Group]/Exec[jenkins enable-job Update a Prod Security Group]: Skipping because of failed dependencies
Error: cat "/tmp/Update Deploy Prod Security Group-config.xml" | java -jar /usr/lib/jenkins/jenkins-cli.jar -s http://localhost:8080 create-job "Update Deploy Prod Security Group" returned 255 instead of one of [0]
Error: /Stage[main]/Profile_jenk::Jenkjobs/Jenkins::Job[Update Deploy Prod Security Group]/Jenkins::Job::Present[Update Deploy Prod Security Group]/Exec[jenkins create-job Update Deploy Prod Security Group]/returns: change from notrun to 0 failed: cat "/tmp/Update Deploy Prod Security Group-config.xml" | java -jar /usr/lib/jenkins/jenkins-cli.jar -s http://localhost:8080 create-job "Update Deploy Prod Security Group" returned 255 instead of one of [0]
Notice: /Stage[main]/Profile_jenk::Jenkjobs/Jenkins::Job[Update Deploy Prod Security Group]/Jenkins::Job::Present[Upda
"Resources": {
"VarVolume": {
"Type" : "AWS::EC2::Volume",
"Properties" : {
"Size" : "100",
"Encrypted" : "true",
"AvailabilityZone" : {
"Fn::GetAtt" : [ "Linux", "AvailabilityZone" ]
},
"Tags": [
class profile_jenk::jenkruby {
class { 'rbenv':
install_dir => '/opt/rbenv'
}
rbenv::plugin { 'sstephenson/ruby-build': }
rbenv::build { '2.2.3': global => true }
rbenv::build { '2.2.0': }
rbenv::gem { 'aws-sdk': ruby_version => '2.2.3' }
@chewmanfoo
chewmanfoo / file_write.rb
Created March 11, 2016 05:41
ruby file write doesn't work
require 'tmpdir'
require 'fileutils'
_role="test"
Dir.mktmpdir do |dir|
git_dir="#{dir}"
`git clone http://10.23.227.82/control/corpit-env_control.git #{dir}`
File.open("#{dir}/Puppetfile.temp", "w") do |out_file|
@chewmanfoo
chewmanfoo / ruby.rb
Created February 15, 2016 21:33
backticks
def insert_default_parameters(_template_path, _role, _portsin)
#TODO fix this shit
out = `echo #{_template_path};ls #{_template_path}`
p "****** after test ******"
p out
#foo="/var/lib/jenkins/jobs/Create\ a\ Security\ Group/workspace/corpit-cloudformation-vm-provisioning/environments/cit_production/int/cit-p-wbap_sg.json"
foo="#{_template_path}".gsub("\\","")
@chewmanfoo
chewmanfoo / irb.rb
Created February 15, 2016 19:27
ruby path
1.9.3-p551 :019 > foo = "/var/lib/jenkins/jobs/Create a Security Group/workspace/corpit-cloudformation-vm-provisioning/environments/cit_production/int/cit-p-wbap_sg.json"
=> "/var/lib/jenkins/jobs/Create a Security Group/workspace/corpit-cloudformation-vm-provisioning/environments/cit_production/int/cit-p-wbap_sg.json"
1.9.3-p551 :020 > `ls #{foo}`
ls: cannot access /var/lib/jenkins/jobs/Create: No such file or directory
ls: cannot access a: No such file or directory
ls: cannot access Security: No such file or directory
ls: cannot access Group/workspace/corpit-cloudformation-vm-provisioning/environments/cit_production/int/cit-p-wbap_sg.json: No such file or directory
=> ""
@chewmanfoo
chewmanfoo / irb.rb
Created February 15, 2016 19:22
ruby can't see a file
1.9.3-p551 :010 > foo = "/var/lib/jenkins/jobs/'Create a Security Group'/workspace/corpit-cloudformation-vm-provisioning/environments/cit_production/int/cit-p-wbap_sg.json"
=> "/var/lib/jenkins/jobs/'Create a Security Group'/workspace/corpit-cloudformation-vm-provisioning/environments/cit_production/int/cit-p-wbap_sg.json"
1.9.3-p551 :011 > File.open(foo, "r") do |t|
1.9.3-p551 :012 > p t
1.9.3-p551 :013?> end
Errno::ENOENT: No such file or directory - /var/lib/jenkins/jobs/'Create a Security Group'/workspace/corpit-cloudformation-vm-provisioning/environments/cit_production/int/cit-p-wbap_sg.json
from (irb):11:in `initialize'
from (irb):11:in `open'
from (irb):11
from /usr/local/rvm/rubies/ruby-1.9.3-p551/bin/irb:12:in `<main>'
[email protected]:~# service puppetserver status
puppetserver (pid 2866) is running...
[email protected]:~# ps -ef | grep 2866
puppet 2866 1 6 14:56 ? 00:01:53 /usr/bin/java -XX:OnOutOfMemoryError=kill -9 %p -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/puppetserver -Djava.security.egd=/dev/urandom -Xms2g -Xmx2g -XX:MaxPermSize=256m -cp /usr/share/puppetserver/puppet-server-release.jar clojure.main -m puppetlabs.trapperkeeper.main --config /etc/puppetserver/conf.d -b /etc/puppetserver/bootstrap.cfg
root 8254 2821 0 15:24 pts/1 00:00:00 grep 2866
[email protected]:~# which puppetserver
/usr/bin/puppetserver
[email protected]:~# puppetserver gem list
*** LOCAL GEMS ***
hiera (3.0.6, 1.3.4)
hiera-eyaml (2.0.8)
hiera-puppet (1.0.0)
highline (1.6.21)
jar-dependencies (0.1.13)
jruby-openssl (0.9.7 java)
@chewmanfoo
chewmanfoo / deployable_application.rb
Created January 14, 2016 16:04
why doesn't app.versions get created?
class DeployableApplication < ActiveRecord::Base
belongs_to :git_repo
belongs_to :rpm_repo
has_many :versions
end