This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/etc/yum.repos.d/base.repo | |
/etc/yum.repos.d/updates.repo | |
/etc/yum.repos.d/extras.repo | |
veryfing centos yum channel repositories | |
File "/etc/yum.repos.d/base.repo" | |
should exist | |
should be owned by "root" | |
should be grouped into "root" | |
File "/etc/yum.repos.d/updates.repo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node.default['my-base']['centos']['repo_url'] = "SOME_URL_#{(node.chef_environment.eql? 'sandbox') ? 'dev' : 'prod'}" | |
node.default['yum']['base']['enabled'] = true | |
node.set['yum']['base']['mirrorlist'] = nil | |
node.set['yum']['base']['baseurl'] = "#{node['my-base']['centos']['repo_url']}/$releasever/os/$basearch/" | |
node.default['yum']['base']['sslverify'] = false | |
node.default['yum']['base']['gpgcheck'] = false | |
node.default['yum']['updates']['enabled'] = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Support whyrun | |
def whyrun_supported? | |
true | |
end | |
action :create do | |
if @current_resource.exists | |
Chef::Log.info "#{ @current_resource } already exists - nothing to do." | |
else | |
converge_by("Create #{ @current_resource }") do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2015-06-02T23:26:42+00:00] DEBUG: yum_package[chef] checking rpm status | |
warning: /tmp/kitchen/cache/omnibus_updater/chef-12.3.0-1.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY | |
chef 12.3.0-1.el6 | |
[2015-06-02T23:26:42+00:00] DEBUG: yum_package[chef] installed version: ["12.2.1-1.el6"] candidate version: 12.3.0-1.el6 | |
================================================================================ | |
Error executing action `create` on resource 'yum_package[chef]' | |
================================================================================ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Recipe: git::default | |
* git_client[default] action install | |
================================================================================ | |
Error executing action `install` on resource 'git_client[default]' | |
================================================================================ | |
NoMethodError | |
------------- | |
undefined method `package_version' for Chef::Resource::YumPackage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
selinux_policy_module modulename do | |
action :deploy | |
end | |
end | |
file "#{path}/#{modulename}.pp" do | |
action :delete | |
end | |
selinux_policy_module modulename do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
secret = Chef::EncryptedDataBagItem.load_secret("#{node['diw']['base']['secrets']}") | |
require 'net/ssh' | |
key = OpenSSL::PKey::RSA.new(4096) | |
private_key = key.to_pem | |
public_key = "#{key.ssh_type} #{[key.to_blob].pack('m0')}" | |
jenkins_keys = { | |
"id" => "#{node[:hostname]}", |
NewerOlder